components/code/src/command.rules.js
// An constraint described as `but not` in the GraphQL spec.
An constraint described as `but not` in the GraphQL spec.
An constraint described as ` but not ` in the GraphQL spec .
function butNot(rule, exclusions) {
		var ruleMatch = rule.match;
		rule.match = function (token) {
			var check = false;
			if (ruleMatch) {
				check = ruleMatch(token);
			}
			return check && exclusions.every(function (exclusion) {
					return exclusion.match && !exclusion.match(token);
				});
		};
		return rule;
	}
function butNot ( rule , exclusions ) { var ruleMatch = rule . match ; rule . match = function ( token ) { var check = false ; if ( ruleMatch ) { check = ruleMatch ( token ) ; } return check && exclusions . every ( function ( exclusion ) { return exclusion . match && ! exclusion . match ( token ) ; } ) ; } ; return rule ; }
An constraint described as `but not` in the GraphQL spec.
An constraint described as ` but not ` in the GraphQL spec .