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
27
frontend/node_modules/es-toolkit/dist/set/countBy.d.ts
generated
vendored
Normal file
27
frontend/node_modules/es-toolkit/dist/set/countBy.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//#region src/set/countBy.d.ts
|
||||
/**
|
||||
* Counts the occurrences of items in a Set based on a transformation function.
|
||||
*
|
||||
* This function takes a Set and a function that generates a key from each value.
|
||||
* It returns a Map with the generated keys and their counts as values.
|
||||
* The count is incremented for each element for which the transformation produces the same key.
|
||||
*
|
||||
* @template T - The type of elements in the Set.
|
||||
* @template K - The type of keys produced by the transformation function.
|
||||
* @param set - The Set to count occurrences from.
|
||||
* @param mapper - The function to produce a key for counting.
|
||||
* @returns A Map containing the mapped keys and their counts.
|
||||
*
|
||||
* @example
|
||||
* const set = new Set([1, 2, 3, 4, 5]);
|
||||
* const result = countBy(set, (value) => value % 2 === 0 ? 'even' : 'odd');
|
||||
* // result will be Map(2) { 'odd' => 3, 'even' => 2 }
|
||||
*
|
||||
* @example
|
||||
* const set = new Set(['apple', 'banana', 'cherry']);
|
||||
* const result = countBy(set, (value) => value.length);
|
||||
* // result will be Map(2) { 5 => 1, 6 => 2 }
|
||||
*/
|
||||
declare function countBy<T, K>(set: Set<T>, mapper: (value: T, value2: T, set: Set<T>) => K): Map<K, number>;
|
||||
//#endregion
|
||||
export { countBy };
|
||||
Loading…
Add table
Add a link
Reference in a new issue