Files
lodash/_overArg.js
John-David Dalton edb45df54b Bump to v4.14.0.
2016-07-24 09:52:04 -07:00

19 lines
429 B
JavaScript

define([], function() {
/**
* Creates a function that invokes `func` with its first 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));
};
}
return overArg;
});