feature: vor und nachteile

This commit is contained in:
Hikyu
2026-05-31 13:54:31 +02:00
parent 552a947a1c
commit e3dad17446
23270 changed files with 3024794 additions and 200 deletions
+16
View File
@@ -0,0 +1,16 @@
import { updateWith } from "./updateWith.mjs";
//#region src/compat/object/update.ts
/**
* Updates the value at the specified path of the given object using an updater function.
* If any part of the path does not exist, it will be created.
*
* @param {object} obj - The object to modify.
* @param {PropertyPath} path - The path of the property to update.
* @param {(value: any) => any} updater - The function to produce the updated value.
* @returns {any} - The modified object.
*/
function update(obj, path, updater) {
return updateWith(obj, path, updater, () => void 0);
}
//#endregion
export { update };