Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
472 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var toPropertyKey = require('../internals/to-property-key');
|
---|
3 | var definePropertyModule = require('../internals/object-define-property');
|
---|
4 | var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
---|
5 |
|
---|
6 | module.exports = function (object, key, value) {
|
---|
7 | var propertyKey = toPropertyKey(key);
|
---|
8 | if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
---|
9 | else object[propertyKey] = value;
|
---|
10 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.