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
33
frontend/node_modules/es-toolkit/dist/fp/array/intersectionBy.js
generated
vendored
Normal file
33
frontend/node_modules/es-toolkit/dist/fp/array/intersectionBy.js
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
const require_intersectionBy = require("../../array/intersectionBy.js");
|
||||
const require_lazy = require("../_internal/lazy.js");
|
||||
//#region src/fp/array/intersectionBy.ts
|
||||
/**
|
||||
* Creates a function that keeps values whose mapped identity appears in another array.
|
||||
*
|
||||
* The mapper is applied to values from both arrays. The returned function is
|
||||
* lazy-capable inside {@link pipe}.
|
||||
*
|
||||
* @template T - The type of elements in the piped array.
|
||||
* @template U - The type of elements in the configured array.
|
||||
* @param secondArray - Values to intersect with the piped array after mapping.
|
||||
* @param mapper - Maps values from both arrays to comparison keys.
|
||||
* @returns A function that maps the piped array to its mapped intersection.
|
||||
*
|
||||
* @example
|
||||
* import { intersectionBy, pipe } from 'es-toolkit/fp';
|
||||
*
|
||||
* pipe([{ id: 1 }, { id: 2 }], intersectionBy([2], value => typeof value === 'number' ? value : value.id));
|
||||
* // => [{ id: 2 }]
|
||||
*/
|
||||
function intersectionBy(secondArray, mapper) {
|
||||
const mappedSecondSet = new Set(secondArray.map((item) => mapper(item)));
|
||||
function intersectionByEager(array) {
|
||||
return require_intersectionBy.intersectionBy(array, secondArray, mapper);
|
||||
}
|
||||
const intersectionByLazy = require_lazy.createLazyFunction((value, _index, emit) => {
|
||||
if (mappedSecondSet.has(mapper(value))) emit(value);
|
||||
});
|
||||
return require_lazy.combineEagerAndLazyFunctions(intersectionByEager, intersectionByLazy);
|
||||
}
|
||||
//#endregion
|
||||
exports.intersectionBy = intersectionBy;
|
||||
Loading…
Add table
Add a link
Reference in a new issue