14 lines
385 B
JavaScript
14 lines
385 B
JavaScript
// all enumerable object keys, includes symbols
|
|
var $ = require('./$');
|
|
module.exports = function(it){
|
|
var keys = $.getKeys(it)
|
|
, getSymbols = $.getSymbols;
|
|
if(getSymbols){
|
|
var symbols = getSymbols(it)
|
|
, isEnum = $.isEnum
|
|
, i = 0
|
|
, key;
|
|
while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
|
|
}
|
|
return keys;
|
|
}; |