mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Remove overArg.
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import overArg from './.internal/overArg.js';
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
const nativeKeys = overArg(Object.keys, Object);
|
||||
/**
|
||||
* This function is a thin wrapper around
|
||||
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||
* which ensures non-object values are coerced to objects beforehand.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function nativeKeys(object) {
|
||||
return Object.keys(Object(object));
|
||||
}
|
||||
|
||||
export default nativeKeys;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* 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