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
35
frontend/node_modules/es-toolkit/dist/fp/array/uniqWith.js
generated
vendored
Normal file
35
frontend/node_modules/es-toolkit/dist/fp/array/uniqWith.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
const require_uniqWith = require("../../array/uniqWith.js");
|
||||
const require_lazy = require("../_internal/lazy.js");
|
||||
//#region src/fp/array/uniqWith.ts
|
||||
/**
|
||||
* Creates a function that removes duplicate values using a custom equality function.
|
||||
*
|
||||
* The first value in each equality group is preserved. The returned function is
|
||||
* lazy-capable inside {@link pipe}.
|
||||
*
|
||||
* @template T - The type of elements in the array.
|
||||
* @param areItemsEqual - Returns true when two values should be treated as equal.
|
||||
* @returns A function that maps the piped array to unique values.
|
||||
*
|
||||
* @example
|
||||
* import { pipe, uniqWith } from 'es-toolkit/fp';
|
||||
*
|
||||
* pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqWith((a, b) => a.id === b.id));
|
||||
* // => [{ id: 1 }, { id: 2 }]
|
||||
*/
|
||||
function uniqWith(areItemsEqual) {
|
||||
function uniqWithEager(array) {
|
||||
return require_uniqWith.uniqWith(array, areItemsEqual);
|
||||
}
|
||||
const uniqWithLazy = (emit) => {
|
||||
const seen = [];
|
||||
return (value) => {
|
||||
if (seen.some((item) => areItemsEqual(item, value))) return true;
|
||||
seen.push(value);
|
||||
return emit(value);
|
||||
};
|
||||
};
|
||||
return require_lazy.combineEagerAndLazyFunctions(uniqWithEager, uniqWithLazy);
|
||||
}
|
||||
//#endregion
|
||||
exports.uniqWith = uniqWith;
|
||||
Loading…
Add table
Add a link
Reference in a new issue