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
21
frontend/node_modules/es-toolkit/dist/compat/array/sample.mjs
generated
vendored
Normal file
21
frontend/node_modules/es-toolkit/dist/compat/array/sample.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { sample as sample$1 } from "../../array/sample.mjs";
|
||||
import { toArray } from "../_internal/toArray.mjs";
|
||||
import { isArrayLike } from "../predicate/isArrayLike.mjs";
|
||||
//#region src/compat/array/sample.ts
|
||||
/**
|
||||
* The implementation for the overloaded sample function.
|
||||
*
|
||||
* This function takes an array, string, or object and returns a single element selected randomly.
|
||||
* If the input is empty, or if it's null or undefined, the function returns `undefined`.
|
||||
*
|
||||
* @template T - The type of elements in the collection.
|
||||
* @param collection - The collection to sample from.
|
||||
* @returns A random element from the collection, or `undefined` if the collection is empty or invalid.
|
||||
*/
|
||||
function sample(collection) {
|
||||
if (collection == null) return;
|
||||
if (isArrayLike(collection)) return sample$1(toArray(collection));
|
||||
return sample$1(Object.values(collection));
|
||||
}
|
||||
//#endregion
|
||||
export { sample };
|
||||
Loading…
Add table
Add a link
Reference in a new issue