wallet-core/node_modules/core-js/modules/$.object-to-array.js
2017-05-03 15:35:00 +02:00

16 lines
443 B
JavaScript

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;
};
};