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
29
frontend/node_modules/es-toolkit/dist/array/xorWith.js
generated
vendored
Normal file
29
frontend/node_modules/es-toolkit/dist/array/xorWith.js
generated
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
const require_differenceWith = require("./differenceWith.js");
|
||||
const require_intersectionWith = require("./intersectionWith.js");
|
||||
const require_unionWith = require("./unionWith.js");
|
||||
//#region src/array/xorWith.ts
|
||||
/**
|
||||
* Computes the symmetric difference between two arrays using a custom equality function.
|
||||
* The symmetric difference is the set of elements which are in either of the arrays,
|
||||
* but not in their intersection.
|
||||
*
|
||||
* @template T - Type of elements in the input arrays.
|
||||
*
|
||||
* @param arr1 - The first array.
|
||||
* @param arr2 - The second array.
|
||||
* @param areElementsEqual - The custom equality function to compare elements.
|
||||
* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function.
|
||||
*
|
||||
* @example
|
||||
* // Custom equality function for objects with an 'id' property
|
||||
* const areObjectsEqual = (a, b) => a.id === b.id;
|
||||
* xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual);
|
||||
* // Returns [{ id: 1 }, { id: 3 }]
|
||||
*/
|
||||
function xorWith(arr1, arr2, areElementsEqual) {
|
||||
const union = require_unionWith.unionWith(arr1, arr2, areElementsEqual);
|
||||
const intersection = require_intersectionWith.intersectionWith(arr1, arr2, areElementsEqual);
|
||||
return require_differenceWith.differenceWith(union, intersection, areElementsEqual);
|
||||
}
|
||||
//#endregion
|
||||
exports.xorWith = xorWith;
|
||||
Loading…
Add table
Add a link
Reference in a new issue