MCPcopy Create free account
hub / github.com/RubyLouvre/anu / overArg

Function overArg

test/babel.js:28689–28693  ·  view source on GitHub ↗

* Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function.

(func, transform)

Source from the content-addressed store, hash-verified

28687 * @returns {Function} Returns the new function.
28688 */
28689 function overArg(func, transform) {
28690 return function (arg) {
28691 return func(transform(arg));
28692 };
28693 }
28694
28695 module.exports = overArg;
28696

Callers 1

babel.jsFile · 0.70

Calls 1

transformFunction · 0.85

Tested by

no test coverage detected