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
22
frontend/node_modules/es-toolkit/dist/compat/util/times.js
generated
vendored
Normal file
22
frontend/node_modules/es-toolkit/dist/compat/util/times.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const require_toInteger = require("./toInteger.js");
|
||||
//#region src/compat/util/times.ts
|
||||
/**
|
||||
* Invokes the getValue function n times, returning an array of the results.
|
||||
*
|
||||
* @template R The return type of the getValue function.
|
||||
* @param n - The number of times to invoke getValue.
|
||||
* @param getValue - The function to invoke for each index.
|
||||
* @returns An array containing the results of invoking getValue n times.
|
||||
* @example
|
||||
* times(3, (i) => i * 2); // => [0, 2, 4]
|
||||
* times(2, () => 'es-toolkit'); // => ['es-toolkit', 'es-toolkit']
|
||||
*/
|
||||
function times(n, getValue) {
|
||||
n = require_toInteger.toInteger(n);
|
||||
if (n < 1 || !Number.isSafeInteger(n)) return [];
|
||||
const result = new Array(n);
|
||||
for (let i = 0; i < n; i++) result[i] = typeof getValue === "function" ? getValue(i) : i;
|
||||
return result;
|
||||
}
|
||||
//#endregion
|
||||
exports.times = times;
|
||||
Loading…
Add table
Add a link
Reference in a new issue