MCPcopy
hub / github.com/preactjs/preact / invokeOrReturn

Function invokeOrReturn

hooks/src/index.js:547–549  ·  view source on GitHub ↗

* @template Arg * @param {Arg} arg * @param {(arg: Arg) => any} f * @returns {any}

(arg, f)

Source from the content-addressed store, hash-verified

545 * @returns {any}
546 */
547function invokeOrReturn(arg, f) {
548 return typeof f == 'function' ? f(arg) : f;
549}

Callers 1

useReducerFunction · 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…