index.js
function getArguments(name, mixin, obj) {
		let named = obj.named,
			ordered = obj.ordered,
			args = [],
			parameters;

		// Cache function parameter names
		if (! mixinArguments[name]) {
			mixinArguments[name] = mixin.toString()
				// Strip out quoted strings (stripping possible commas from parameters)
				.replace(/'((?:[^'\\])*)'|"((?:[^"\\])*)"/g, '')
				// Pull out parameters from function
				.match(/(?:function)?\s?.*?\s?\(([^)]*)\)/)[1]
				.split(',')
				.map(function(arg) {
					return arg.split('=')[0].trim();
				});
		}

		parameters = mixinArguments[name];

		Object.keys(named).forEach(key => {
			parameters.forEach((param, i) => {
				if (key === param) {
					args[i] = castArgument(named[key]);
				}
			});
		});

		ordered.forEach((arg, i) => {
			args[i] = castArgument(arg);
		});

		return args;
	}
function getArguments(name, mixin, obj) {
		let named = obj.named,
			ordered = obj.ordered,
			args = [],
			parameters;

		// Cache function parameter names
		if (! mixinArguments[name]) {
			mixinArguments[name] = mixin.toString()
				// Strip out quoted strings (stripping possible commas from parameters)
				.replace(/'((?:[^'\\])*)'|"((?:[^"\\])*)"/g, '')
				// Pull out parameters from function
				.match(/(?:function)?\s?.*?\s?\(([^)]*)\)/)[1]
				.split(',')
				.map(function(arg) {
					return arg.split('=')[0].trim();
				});
		}

		parameters = mixinArguments[name];

		Object.keys(named).forEach(key => {
			parameters.forEach((param, i) => {
				if (key === param) {
					args[i] = castArgument(named[key]);
				}
			});
		});

		ordered.forEach((arg, i) => {
			args[i] = castArgument(arg);
		});

		return args;
	}
function getArguments ( name , mixin , obj ) { let named = obj . named , ordered = obj . ordered , args = [ ] , parameters ; // Cache function parameter names if ( ! mixinArguments [ name ] ) { mixinArguments [ name ] = mixin . toString ( ) // Strip out quoted strings (stripping possible commas from parameters) . replace ( / '((?:[^'\\])*)'|"((?:[^"\\])*)" / g , '' ) // Pull out parameters from function . match ( / (?:function)?\s?.*?\s?\(([^)]*)\) / ) [ 1 ] . split ( ',' ) . map ( function ( arg ) { return arg . split ( '=' ) [ 0 ] . trim ( ) ; } ) ; } parameters = mixinArguments [ name ] ; Object . keys ( named ) . forEach ( key => { parameters . forEach ( ( param , i ) => { if ( key === param ) { args [ i ] = castArgument ( named [ key ] ) ; } } ) ; } ) ; ordered . forEach ( ( arg , i ) => { args [ i ] = castArgument ( arg ) ; } ) ; return args ; }
Generate arguments array

@param {string} name
@param {function} mixin
@param {object} obj - mixin arguments property
@returns {Array}
Generate arguments array