MCPcopy Create free account
hub / github.com/microsoft/SandDance / invokeArrayArg

Function invokeArrayArg

docs/tests/v3/es6/js/sanddance-test-es6.js:40440–40446  ·  view source on GitHub ↗

* if the argument is an array, we want to execute the fn on each entry * if it aint an array we don't want to do a thing. * this is used by all the methods that accept a single and array argument. * @param {*|Array} arg * @param {String} fn * @param {Object} [context] * @returns {Boolean}

(arg, fn, context)

Source from the content-addressed store, hash-verified

40438 * @param {Object} [context]
40439 * @returns {Boolean}
40440 */ function invokeArrayArg(arg, fn, context) {
40441 if (Array.isArray(arg)) {
40442 each(arg, context[fn], context);
40443 return true;
40444 }
40445 return false;
40446 }
40447 /**
40448 * walk objects and arrays
40449 * @param {Object} obj

Callers 1

Calls 1

eachFunction · 0.70

Tested by

no test coverage detected