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
26
frontend/node_modules/es-toolkit/dist/array/uniqWith.js
generated
vendored
Normal file
26
frontend/node_modules/es-toolkit/dist/array/uniqWith.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//#region src/array/uniqWith.ts
|
||||
/**
|
||||
* Returns a new array containing only the unique elements from the original array,
|
||||
* based on the values returned by the comparator function.
|
||||
*
|
||||
* @template T - The type of elements in the array.
|
||||
* @param arr - The array to process.
|
||||
* @param areItemsEqual - The function used to compare the array elements.
|
||||
* @returns A new array containing only the unique elements from the original array, based on the values returned by the comparator function.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);
|
||||
* // [1.2, 3.2, 5.7, 7.19]
|
||||
* ```
|
||||
*/
|
||||
function uniqWith(arr, areItemsEqual) {
|
||||
const result = [];
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const item = arr[i];
|
||||
if (result.every((v) => !areItemsEqual(v, item))) result.push(item);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//#endregion
|
||||
exports.uniqWith = uniqWith;
|
||||
Loading…
Add table
Add a link
Reference in a new issue