main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
623 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import defineProperty from './_defineProperty.js';
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * The base implementation of `assignValue` and `assignMergeValue` without
|
---|
| 5 | * value checks.
|
---|
| 6 | *
|
---|
| 7 | * @private
|
---|
| 8 | * @param {Object} object The object to modify.
|
---|
| 9 | * @param {string} key The key of the property to assign.
|
---|
| 10 | * @param {*} value The value to assign.
|
---|
| 11 | */
|
---|
| 12 | function baseAssignValue(object, key, value) {
|
---|
| 13 | if (key == '__proto__' && defineProperty) {
|
---|
| 14 | defineProperty(object, key, {
|
---|
| 15 | 'configurable': true,
|
---|
| 16 | 'enumerable': true,
|
---|
| 17 | 'value': value,
|
---|
| 18 | 'writable': true
|
---|
| 19 | });
|
---|
| 20 | } else {
|
---|
| 21 | object[key] = value;
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | export default baseAssignValue;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.