Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cae411eae7
commit
1c411e402e
19809 changed files with 1962608 additions and 97 deletions
45
frontend/node_modules/es-toolkit/dist/compat/object/merge.mjs
generated
vendored
Normal file
45
frontend/node_modules/es-toolkit/dist/compat/object/merge.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { noop } from "../../function/noop.mjs";
|
||||
import { mergeWith } from "./mergeWith.mjs";
|
||||
//#region src/compat/object/merge.ts
|
||||
/**
|
||||
* Merges the properties of one or more source objects into the target object.
|
||||
*
|
||||
* This function performs a deep merge, recursively merging nested objects and arrays.
|
||||
* If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
|
||||
* If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.
|
||||
*
|
||||
* The function can handle multiple source objects and will merge them all into the target object.
|
||||
*
|
||||
* @param object - The target object into which the source object properties will be merged. This object is modified in place.
|
||||
* @param sources - The source objects whose properties will be merged into the target object.
|
||||
* @returns The updated target object with properties from the source object(s) merged in.
|
||||
*
|
||||
* @example
|
||||
* const target = { a: 1, b: { x: 1, y: 2 } };
|
||||
* const source = { b: { y: 3, z: 4 }, c: 5 };
|
||||
*
|
||||
* const result = merge(target, source);
|
||||
* console.log(result);
|
||||
* // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }
|
||||
*
|
||||
* @example
|
||||
* const target = { a: [1, 2], b: { x: 1 } };
|
||||
* const source = { a: [3], b: { y: 2 } };
|
||||
*
|
||||
* const result = merge(target, source);
|
||||
* console.log(result);
|
||||
* // Output: { a: [3], b: { x: 1, y: 2 } }
|
||||
*
|
||||
* @example
|
||||
* const target = { a: null };
|
||||
* const source = { a: [1, 2, 3] };
|
||||
*
|
||||
* const result = merge(target, source);
|
||||
* console.log(result);
|
||||
* // Output: { a: [1, 2, 3] }
|
||||
*/
|
||||
function merge(object, ...sources) {
|
||||
return mergeWith(object, ...sources, noop);
|
||||
}
|
||||
//#endregion
|
||||
export { merge };
|
||||
Loading…
Add table
Add a link
Reference in a new issue