wallet-core/node_modules/core-js/modules/$.keyof.js

10 lines
299 B
JavaScript
Raw Normal View History

2017-05-03 15:35:00 +02:00
var $ = require('./$')
, toIObject = require('./$.to-iobject');
module.exports = function(object, el){
var O = toIObject(object)
, keys = $.getKeys(O)
, length = keys.length
, index = 0
, key;
while(length > index)if(O[key = keys[index++]] === el)return key;
};