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
27
frontend/node_modules/es-toolkit/dist/compat/util/toSafeInteger.js
generated
vendored
Normal file
27
frontend/node_modules/es-toolkit/dist/compat/util/toSafeInteger.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
const require_toInteger = require("./toInteger.js");
|
||||
const require_clamp = require("../math/clamp.js");
|
||||
const require_MAX_SAFE_INTEGER = require("../_internal/MAX_SAFE_INTEGER.js");
|
||||
//#region src/compat/util/toSafeInteger.ts
|
||||
/**
|
||||
* Converts `value` to a safe integer.
|
||||
*
|
||||
* A safe integer can be compared and represented correctly.
|
||||
*
|
||||
* @param value - The value to convert.
|
||||
* @returns Returns the value converted to a safe integer.
|
||||
*
|
||||
* @example
|
||||
* toSafeInteger(3.2); // => 3
|
||||
* toSafeInteger(Number.MAX_VALUE); // => 9007199254740991
|
||||
* toSafeInteger(Infinity); // => 9007199254740991
|
||||
* toSafeInteger('3.2'); // => 3
|
||||
* toSafeInteger(NaN); // => 0
|
||||
* toSafeInteger(null); // => 0
|
||||
* toSafeInteger(-Infinity); // => -9007199254740991
|
||||
*/
|
||||
function toSafeInteger(value) {
|
||||
if (value == null) return 0;
|
||||
return require_clamp.clamp(require_toInteger.toInteger(value), -require_MAX_SAFE_INTEGER.MAX_SAFE_INTEGER, require_MAX_SAFE_INTEGER.MAX_SAFE_INTEGER);
|
||||
}
|
||||
//#endregion
|
||||
exports.toSafeInteger = toSafeInteger;
|
||||
Loading…
Add table
Add a link
Reference in a new issue