|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
355 bytes
|
| Line | |
|---|
| 1 | import { isEqualsSameValueZero } from '../../_internal/isEqualsSameValueZero.mjs';
|
|---|
| 2 |
|
|---|
| 3 | const assignValue = (object, key, value) => {
|
|---|
| 4 | const objValue = object[key];
|
|---|
| 5 | if (!(Object.hasOwn(object, key) && isEqualsSameValueZero(objValue, value)) || (value === undefined && !(key in object))) {
|
|---|
| 6 | object[key] = value;
|
|---|
| 7 | }
|
|---|
| 8 | };
|
|---|
| 9 |
|
|---|
| 10 | export { assignValue };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.