GT2/Ejectable/node_modules/core-js/modules/$.object-to-array.js

16 lines
443 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
var $ = require('./$')
, toIObject = require('./$.to-iobject')
, isEnum = $.isEnum;
module.exports = function(isEntries){
return function(it){
var O = toIObject(it)
, keys = $.getKeys(O)
, length = keys.length
, i = 0
, result = []
, key;
while(length > i)if(isEnum.call(O, key = keys[i++])){
result.push(isEntries ? [key, O[key]] : O[key]);
} return result;
};
};