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:
jtricerolph 2026-07-20 14:37:36 +00:00
parent cae411eae7
commit 1c411e402e
19809 changed files with 1962608 additions and 97 deletions

View file

@ -0,0 +1,22 @@
const require_isArrayLikeObject = require("../predicate/isArrayLikeObject.js");
const require_toInteger = require("../util/toInteger.js");
//#region src/compat/array/nth.ts
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned.
*
* @param array - The array to query.
* @param [n=0] - The index of the element to return.
* @return {T | undefined} Returns the nth element of `array`.
*
* @example
* nth([1, 2, 3], 1); // => 2
* nth([1, 2, 3], -1); // => 3
*/
function nth(array, n = 0) {
if (!require_isArrayLikeObject.isArrayLikeObject(array) || array.length === 0) return;
n = require_toInteger.toInteger(n);
if (n < 0) n += array.length;
return array[n];
}
//#endregion
exports.nth = nth;