|
123456789101112131415161718192021222324252627282930313233 |
- var isObject = require('./isObject'),
- isPrototype = require('./_isPrototype'),
- nativeKeysIn = require('./_nativeKeysIn');
-
-
- var objectProto = Object.prototype;
-
-
- var hasOwnProperty = objectProto.hasOwnProperty;
-
-
- function baseKeysIn(object) {
- if (!isObject(object)) {
- return nativeKeysIn(object);
- }
- var isProto = isPrototype(object),
- result = [];
-
- for (var key in object) {
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
-
- module.exports = baseKeysIn;
|