Remove nativeKeys and nativeKeysIn.

This commit is contained in:
John-David Dalton
2017-03-21 22:23:03 -07:00
parent f3e0cbe5bf
commit f7a6cddc9e
4 changed files with 9 additions and 40 deletions

View File

@@ -1,5 +1,4 @@
import isPrototype from './isPrototype.js'
import nativeKeys from './nativeKeys.js'
/** Used to check objects for own properties. */
const hasOwnProperty = Object.prototype.hasOwnProperty
@@ -13,7 +12,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object)
return Object.keys(Object(object))
}
const result = []
for (const key in Object(object)) {