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

Function invokeArrayArg

docs/tests/v2/es6/js/sanddance.js:51365–51372  ·  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 {B

(arg, fn, context)

Source from the content-addressed store, hash-verified

51363
51364
51365 function invokeArrayArg(arg, fn, context) {
51366 if (Array.isArray(arg)) {
51367 each(arg, context[fn], context);
51368 return true;
51369 }
51370
51371 return false;
51372 }
51373 /**
51374 * walk objects and arrays
51375 * @param {Object} obj

Callers 1

sanddance.jsFile · 0.70

Calls 1

eachFunction · 0.70

Tested by

no test coverage detected