source: node_modules/es-toolkit/dist/compat/object/setWith.mjs

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 
1import { updateWith } from './updateWith.mjs';
2
3function 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
14export { setWith };
Note: See TracBrowser for help on using the repository browser.