* 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)
| 801 | * @returns {Function} Returns the new function. |
| 802 | */ |
| 803 | function overArg(func, transform) { |
| 804 | return function(arg) { |
| 805 | return func(transform(arg)); |
| 806 | }; |
| 807 | } |
| 808 | |
| 809 | module.exports = overArg; |
| 810 |