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
28
frontend/node_modules/es-toolkit/dist/compat/function/nthArg.js
generated
vendored
Normal file
28
frontend/node_modules/es-toolkit/dist/compat/function/nthArg.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
const require_toInteger = require("../util/toInteger.js");
|
||||
//#region src/compat/function/nthArg.ts
|
||||
/**
|
||||
* Creates a function that retrieves the argument at the specified index `n`.
|
||||
*
|
||||
* If `n` is negative, the nth argument from the end is returned.
|
||||
*
|
||||
* @param [n=0] - The index of the argument to retrieve.
|
||||
* If negative, counts from the end of the arguments list.
|
||||
* @returns A new function that returns the argument at the specified index.
|
||||
*
|
||||
* @example
|
||||
* const getSecondArg = nthArg(1);
|
||||
* const result = getSecondArg('a', 'b', 'c');
|
||||
* console.log(result); // => 'b'
|
||||
*
|
||||
* @example
|
||||
* const getLastArg = nthArg(-1);
|
||||
* const result = getLastArg('a', 'b', 'c');
|
||||
* console.log(result); // => 'c'
|
||||
*/
|
||||
function nthArg(n = 0) {
|
||||
return function(...args) {
|
||||
return args.at(require_toInteger.toInteger(n));
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
exports.nthArg = nthArg;
|
||||
Loading…
Add table
Add a link
Reference in a new issue