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
23
frontend/node_modules/es-toolkit/dist/compat/util/defaultTo.mjs
generated
vendored
Normal file
23
frontend/node_modules/es-toolkit/dist/compat/util/defaultTo.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
//#region src/compat/util/defaultTo.ts
|
||||
/**
|
||||
* Returns the default value for `null`, `undefined`, and `NaN`.
|
||||
*
|
||||
* @template T - The type of the value parameter
|
||||
* @template D - The type of the defaultValue parameter
|
||||
* @param value - The value to check.
|
||||
* @param defaultValue - The default value to return if the first value is null, undefined, or NaN.
|
||||
* @returns Returns either the first value or the default value.
|
||||
*
|
||||
* @example
|
||||
* defaultTo(null, 'default') // returns 'default'
|
||||
* defaultTo(undefined, 42) // returns 42
|
||||
* defaultTo(NaN, 0) // returns 0
|
||||
* defaultTo('actual', 'default') // returns 'actual'
|
||||
* defaultTo(123, 0) // returns 123
|
||||
*/
|
||||
function defaultTo(value, defaultValue) {
|
||||
if (value == null || Number.isNaN(value)) return defaultValue;
|
||||
return value;
|
||||
}
|
||||
//#endregion
|
||||
export { defaultTo };
|
||||
Loading…
Add table
Add a link
Reference in a new issue