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
34
frontend/node_modules/es-toolkit/dist/compat/array/uniqWith.mjs
generated
vendored
Normal file
34
frontend/node_modules/es-toolkit/dist/compat/array/uniqWith.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { uniqWith as uniqWith$1 } from "../../array/uniqWith.mjs";
|
||||
import { isArrayLike } from "../predicate/isArrayLike.mjs";
|
||||
import { uniq } from "./uniq.mjs";
|
||||
//#region src/compat/array/uniqWith.ts
|
||||
/**
|
||||
* This method is like `uniq`, except that it accepts a `comparator` which is used to determine the equality of elements.
|
||||
*
|
||||
* It creates a duplicate-free version of an array, in which only the first occurrence of each element is kept.
|
||||
* If a `comparator` is provided, it will be invoked with two arguments: `(arrVal, othVal)` to compare elements.
|
||||
* If no comparator is provided, shallow equality is used.
|
||||
*
|
||||
* The order of result values is determined by the order they appear in the input array.
|
||||
*
|
||||
* @template T - The type of elements in the array.
|
||||
* @param arr - The array to process.
|
||||
* @param [comparator] - Optional function to compare elements for equality.
|
||||
* @returns A new array with only unique values based on the comparator.
|
||||
*
|
||||
* @example
|
||||
* const array = [1, 2, 2, 3];
|
||||
* const result = uniqWith(array);
|
||||
* // result will be [1, 2, 3]
|
||||
*
|
||||
* const array = [1, 2, 3];
|
||||
* const result = uniqWith(array, (a, b) => a % 2 === b % 2)
|
||||
* // result will be [1, 2]
|
||||
*/
|
||||
function uniqWith(arr, comparator) {
|
||||
if (!isArrayLike(arr)) return [];
|
||||
if (typeof comparator !== "function") return uniq(Array.from(arr));
|
||||
return uniqWith$1(Array.from(arr), (kept, candidate) => comparator(candidate, kept));
|
||||
}
|
||||
//#endregion
|
||||
export { uniqWith };
|
||||
Loading…
Add table
Add a link
Reference in a new issue