lib/amd/slim.js
function hasDefineAmdReference(ast) {
	var result = false;

	types.visit(ast, {
		visitMemberExpression: function(path) {
			if (this.isDefineAmd(path.node)) {
				result = true;
				this.abort();
			}

			this.traverse(path);
		},

		isDefineAmd: function(node) {
			return (
				n.Identifier.check(node.object) &&
				node.object.name === "define" &&
				n.Identifier.check(node.property) &&
				node.property.name === "amd"
			);
		}
	});

	return result;
}
function hasDefineAmdReference(ast) {
	var result = false;

	types.visit(ast, {
		visitMemberExpression: function(path) {
			if (this.isDefineAmd(path.node)) {
				result = true;
				this.abort();
			}

			this.traverse(path);
		},

		isDefineAmd: function(node) {
			return (
				n.Identifier.check(node.object) &&
				node.object.name === "define" &&
				n.Identifier.check(node.property) &&
				node.property.name === "amd"
			);
		}
	});

	return result;
}
function hasDefineAmdReference ( ast ) { var result = false ; types . visit ( ast , { visitMemberExpression : function ( path ) { if ( this . isDefineAmd ( path . node ) ) { result = true ; this . abort ( ) ; } this . traverse ( path ) ; } , isDefineAmd : function ( node ) { return ( n . Identifier . check ( node . object ) && node . object . name === "define" && n . Identifier . check ( node . property ) && node . property . name === "amd" ) ; } } ) ; return result ; }
Whether there is a `define.amd` member expression on the AST
@param {Object} ast - The AST to be checked
@return {boolean}
Whether there is a define . amd member expression on the AST