mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
13
.internal/overArg.js
Normal file
13
.internal/overArg.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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 arg => func(transform(arg));
|
||||
}
|
||||
|
||||
export default overArg;
|
||||
Reference in New Issue
Block a user