src/lib/transforms.js
// return the first set of transformed arguments allowable by the parameters
return the first set of transformed arguments allowable by the parameters
return the first set of transformed arguments allowable by the parameters
function transformArgsByParams(node, params) {
	const nodes = (Object(node).nodes || []).slice(1, -1);
	return params.map(param => nodes.map(
		(childNode, index) => typeof param[index] === 'function' ? param[index](childNode) : null
	).filter(child => typeof child !== 'boolean')).filter(param => param.every(
		result => result !== null
	))[0] || [];
}
function transformArgsByParams ( node , params ) { const nodes = ( Object ( node ) . nodes || [ ] ) . slice ( 1 , - 1 ) ; return params . map ( param => nodes . map ( ( childNode , index ) => typeof param [ index ] === 'function' ? param [ index ] ( childNode ) : null ) . filter ( child => typeof child !== 'boolean' ) ) . filter ( param => param . every ( result => result !== null ) ) [ 0 ] || [ ] ; }
return the first set of transformed arguments allowable by the parameters
return the first set of transformed arguments allowable by the parameters