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
26
frontend/node_modules/es-toolkit/dist/fp/array/countBy.js
generated
vendored
Normal file
26
frontend/node_modules/es-toolkit/dist/fp/array/countBy.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
const require_countBy = require("../../array/countBy.js");
|
||||
//#region src/fp/array/countBy.ts
|
||||
/**
|
||||
* Creates a function that counts values by a derived key.
|
||||
*
|
||||
* The mapper receives each value, its index, and the full input array. The returned object
|
||||
* uses mapper results as keys and occurrence counts as values.
|
||||
*
|
||||
* @template T - The type of elements in the array.
|
||||
* @template K - The property-key type produced by the mapper.
|
||||
* @param mapper - Called with each value, index, and array to produce a key.
|
||||
* @returns A function that maps a readonly array to counts by key.
|
||||
*
|
||||
* @example
|
||||
* import { countBy, pipe } from 'es-toolkit/fp';
|
||||
*
|
||||
* pipe([1, 2, 3, 4, 5], countBy(value => (value % 2 === 0 ? 'even' : 'odd')));
|
||||
* // => { odd: 3, even: 2 }
|
||||
*/
|
||||
function countBy(mapper) {
|
||||
return function(array) {
|
||||
return require_countBy.countBy(array, mapper);
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
exports.countBy = countBy;
|
||||
Loading…
Add table
Add a link
Reference in a new issue