|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
345 bytes
|
| Line | |
|---|
| 1 | import { updateWith } from './updateWith.mjs';
|
|---|
| 2 |
|
|---|
| 3 | function setWith(obj, path, value, customizer) {
|
|---|
| 4 | let customizerFn;
|
|---|
| 5 | if (typeof customizer === 'function') {
|
|---|
| 6 | customizerFn = customizer;
|
|---|
| 7 | }
|
|---|
| 8 | else {
|
|---|
| 9 | customizerFn = () => undefined;
|
|---|
| 10 | }
|
|---|
| 11 | return updateWith(obj, path, () => value, customizerFn);
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | export { setWith };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.