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-define-properties.js 925B

123456789101112131415161718192021
  1. 'use strict';
  2. var DESCRIPTORS = require('../internals/descriptors');
  3. var V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');
  4. var definePropertyModule = require('../internals/object-define-property');
  5. var anObject = require('../internals/an-object');
  6. var toIndexedObject = require('../internals/to-indexed-object');
  7. var objectKeys = require('../internals/object-keys');
  8. // `Object.defineProperties` method
  9. // https://tc39.es/ecma262/#sec-object.defineproperties
  10. // eslint-disable-next-line es/no-object-defineproperties -- safe
  11. exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  12. anObject(O);
  13. var props = toIndexedObject(Properties);
  14. var keys = objectKeys(Properties);
  15. var length = keys.length;
  16. var index = 0;
  17. var key;
  18. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  19. return O;
  20. };