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/cond.mjs
generated
vendored
Normal file
22
frontend/node_modules/es-toolkit/dist/compat/util/cond.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { isFunction } from "../../predicate/isFunction.mjs";
|
||||
import { iteratee } from "./iteratee.mjs";
|
||||
//#region src/compat/util/cond.ts
|
||||
function cond(pairs) {
|
||||
const length = pairs.length;
|
||||
const processedPairs = pairs.map((pair) => {
|
||||
const predicate = pair[0];
|
||||
const func = pair[1];
|
||||
if (!isFunction(func)) throw new TypeError("Expected a function");
|
||||
return [iteratee(predicate), func];
|
||||
});
|
||||
return function(...args) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
const pair = processedPairs[i];
|
||||
const predicate = pair[0];
|
||||
const func = pair[1];
|
||||
if (predicate.apply(this, args)) return func.apply(this, args);
|
||||
}
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { cond };
|
||||
Loading…
Add table
Add a link
Reference in a new issue