PageRenderTime 34ms CodeModel.GetById 22ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/babel-polyfill/node_modules/core-js/library/modules/_object-keys-internal.js

https://bitbucket.org/worklabschd/bingle_customer2
JavaScript | 17 lines | 15 code | 1 blank | 1 comment | 7 complexity | 7ae5c52ba32d0ab9d06518c7e0643c4a MD5 | raw file
 1var has = require('./_has');
 2var toIObject = require('./_to-iobject');
 3var arrayIndexOf = require('./_array-includes')(false);
 4var IE_PROTO = require('./_shared-key')('IE_PROTO');
 5
 6module.exports = function (object, names) {
 7  var O = toIObject(object);
 8  var i = 0;
 9  var result = [];
10  var key;
11  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
12  // Don't enum bug & hidden keys
13  while (names.length > i) if (has(O, key = names[i++])) {
14    ~arrayIndexOf(result, key) || result.push(key);
15  }
16  return result;
17};