MCPcopy
hub / github.com/flowjs/flow.js / evalOpts

Function evalOpts

src/flow.js:1556–1563  ·  view source on GitHub ↗

* If option is a function, evaluate it with given params * @param {*} data * @param {...} args arguments of a callback * @returns {*}

(data, args)

Source from the content-addressed store, hash-verified

1554 * @returns {*}
1555 */
1556 function evalOpts(data, args) {
1557 if (typeof data === "function") {
1558 // `arguments` is an object, not array, in FF, so:
1559 args = Array.prototype.slice.call(arguments);
1560 data = data.apply(null, args.slice(1));
1561 }
1562 return data;
1563 }
1564 Flow.evalOpts = evalOpts;
1565
1566 /**

Callers 1

flow.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…