create-non-enumerable-property.js 438 B

12345678910
  1. var DESCRIPTORS = require('../internals/descriptors');
  2. var definePropertyModule = require('../internals/object-define-property');
  3. var createPropertyDescriptor = require('../internals/create-property-descriptor');
  4. module.exports = DESCRIPTORS ? function (object, key, value) {
  5. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  6. } : function (object, key, value) {
  7. object[key] = value;
  8. return object;
  9. };