frontend/.pnpm-store/v3/files/c8/f3ab801aa97bc4a3813b5f82de0ca4a8a815fb9a0c156110caa1e4237c5dddf8794c7514851e5105f27da6f8c85cc9e38a53d652fcf7f69ba6b8c3be007e19

16 lines
382 B
Plaintext

/**
* 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.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;