15 lines
469 B
JavaScript
15 lines
469 B
JavaScript
// all enumerable object keys, includes symbols
|
|
var getKeys = require('./_object-keys');
|
|
var gOPS = require('./_object-gops');
|
|
var pIE = require('./_object-pie');
|
|
module.exports = function (it) {
|
|
var result = getKeys(it);
|
|
var getSymbols = gOPS.f;
|
|
if (getSymbols) {
|
|
var symbols = getSymbols(it);
|
|
var isEnum = pIE.f;
|
|
var i = 0;
|
|
var key;
|
|
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
|
|
} return result;
|
|
};
|