create-property.js 400 B

123456789
  1. 'use strict';
  2. var DESCRIPTORS = require('../internals/descriptors');
  3. var definePropertyModule = require('../internals/object-define-property');
  4. var createPropertyDescriptor = require('../internals/create-property-descriptor');
  5. module.exports = function (object, key, value) {
  6. if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  7. else object[key] = value;
  8. };