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
32
frontend/node_modules/es-toolkit/dist/map/every.mjs
generated
vendored
Normal file
32
frontend/node_modules/es-toolkit/dist/map/every.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//#region src/map/every.ts
|
||||
/**
|
||||
* Tests whether all entries in a Map satisfy the provided predicate function.
|
||||
*
|
||||
* This function iterates through all entries of the Map and checks if the predicate function
|
||||
* returns true for every entry. It returns true if the predicate is satisfied for all entries,
|
||||
* and false otherwise.
|
||||
*
|
||||
* @template K - The type of keys in the Map.
|
||||
* @template V - The type of values in the Map.
|
||||
* @param map - The Map to test.
|
||||
* @param doesMatch - A predicate function that tests each entry.
|
||||
* @returns true if all entries satisfy the predicate, false otherwise.
|
||||
*
|
||||
* @example
|
||||
* const map = new Map([
|
||||
* ['a', 10],
|
||||
* ['b', 20],
|
||||
* ['c', 30]
|
||||
* ]);
|
||||
* const result = every(map, (value) => value > 5);
|
||||
* // result will be: true
|
||||
*
|
||||
* const result2 = every(map, (value) => value > 15);
|
||||
* // result2 will be: false
|
||||
*/
|
||||
function every(map, doesMatch) {
|
||||
for (const [key, value] of map) if (!doesMatch(value, key, map)) return false;
|
||||
return true;
|
||||
}
|
||||
//#endregion
|
||||
export { every };
|
||||
Loading…
Add table
Add a link
Reference in a new issue