Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

object-keys-internal.js 722B

123456789101112131415161718192021
  1. 'use strict';
  2. var uncurryThis = require('../internals/function-uncurry-this');
  3. var hasOwn = require('../internals/has-own-property');
  4. var toIndexedObject = require('../internals/to-indexed-object');
  5. var indexOf = require('../internals/array-includes').indexOf;
  6. var hiddenKeys = require('../internals/hidden-keys');
  7. var push = uncurryThis([].push);
  8. module.exports = function (object, names) {
  9. var O = toIndexedObject(object);
  10. var i = 0;
  11. var result = [];
  12. var key;
  13. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  14. // Don't enum bug & hidden keys
  15. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  16. ~indexOf(result, key) || push(result, key);
  17. }
  18. return result;
  19. };