123456789101112131415161718192021222324252627282930 |
- var isPrototype = require('./_isPrototype'),
- nativeKeys = require('./_nativeKeys');
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
- }
- module.exports = baseKeys;
|