All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.internals.create-property.js Maven / Gradle / Ivy

There is a newer version: 3.39.0
Show newest version
'use strict';
var toPropertyKey = require('../internals/to-property-key');
var definePropertyModule = require('../internals/object-define-property');
var createPropertyDescriptor = require('../internals/create-property-descriptor');

module.exports = function (object, key, value) {
  var propertyKey = toPropertyKey(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy