* 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)
| 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 |