GoScrobble/web/node_modules/core-js-pure/internals/create-property.js

11 lines
472 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
'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;
};