_keyof.js 309 B

12345678910
  1. var getKeys = require('./_object-keys');
  2. var toIObject = require('./_to-iobject');
  3. module.exports = function (object, el) {
  4. var O = toIObject(object);
  5. var keys = getKeys(O);
  6. var length = keys.length;
  7. var index = 0;
  8. var key;
  9. while (length > index) if (O[key = keys[index++]] === el) return key;
  10. };