Remove overArg.

This commit is contained in:
John-David Dalton
2017-01-10 17:45:08 -08:00
parent 0aa7a62dc3
commit e52c421c1d
2 changed files with 12 additions and 17 deletions

View File

@@ -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;

View File

@@ -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;