We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
overArg
1 parent 0aa7a62 commit e52c421Copy full SHA for e52c421
.internal/nativeKeys.js
@@ -1,6 +1,14 @@
1
-import overArg from './.internal/overArg.js';
2
-
3
-/* Built-in method references for those with the same name as other `lodash` methods. */
4
-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.
5
+ *
6
+ * @private
7
+ * @param {Object} object The object to query.
8
+ * @returns {Array} Returns the array of property names.
9
+ */
10
+function nativeKeys(object) {
11
+ return Object.keys(Object(object));
12
+}
13
14
export default nativeKeys;
.internal/overArg.js
0 commit comments