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
37
frontend/node_modules/es-toolkit/dist/array/countBy.d.mts
generated
vendored
Normal file
37
frontend/node_modules/es-toolkit/dist/array/countBy.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
//#region src/array/countBy.d.ts
|
||||
/**
|
||||
* Count the occurrences of each item in an array
|
||||
* based on a transformation function.
|
||||
*
|
||||
* This function takes an array and a transformation function
|
||||
* that converts each item in the array to a key. It then
|
||||
* counts the occurrences of each transformed item and returns
|
||||
* an object with the transformed items as keys and the counts
|
||||
* as values.
|
||||
*
|
||||
* @template T - The type of the items in the input array.
|
||||
* @template K - The type of keys.
|
||||
* @param arr - The input array to count occurrences.
|
||||
* @param mapper - The transformation function that maps each item, its index, and the array to a key.
|
||||
* @returns An object containing the transformed items as keys and the
|
||||
* counts as values.
|
||||
*
|
||||
* @example
|
||||
* const array = ['a', 'b', 'c', 'a', 'b', 'a'];
|
||||
* const result = countBy(array, x => x);
|
||||
* // result will be { a: 3, b: 2, c: 1 }
|
||||
*
|
||||
* @example
|
||||
* const array = [1, 2, 3, 4, 5];
|
||||
* const result = countBy(array, item => item % 2 === 0 ? 'even' : 'odd');
|
||||
* // result will be { odd: 3, even: 2 }
|
||||
*
|
||||
* @example
|
||||
* // Using index parameter
|
||||
* const array = ['a', 'b', 'c', 'd'];
|
||||
* const result = countBy(array, (item, index) => index < 2 ? 'first' : 'rest');
|
||||
* // result will be { first: 2, rest: 2 }
|
||||
*/
|
||||
declare function countBy<T, K extends PropertyKey>(arr: readonly T[], mapper: (item: T, index: number, array: readonly T[]) => K): Record<K, number>;
|
||||
//#endregion
|
||||
export { countBy };
|
||||
Loading…
Add table
Add a link
Reference in a new issue