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
26
frontend/node_modules/es-toolkit/dist/compat/util/toInteger.mjs
generated
vendored
Normal file
26
frontend/node_modules/es-toolkit/dist/compat/util/toInteger.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { toFinite } from "./toFinite.mjs";
|
||||
//#region src/compat/util/toInteger.ts
|
||||
/**
|
||||
* Converts `value` to an integer.
|
||||
*
|
||||
* This function first converts `value` to a finite number. If the result has any decimal places,
|
||||
* they are removed by rounding down to the nearest whole number.
|
||||
*
|
||||
* @param value - The value to convert.
|
||||
* @returns Returns the number.
|
||||
*
|
||||
* @example
|
||||
* toInteger(3.2); // => 3
|
||||
* toInteger(Number.MIN_VALUE); // => 0
|
||||
* toInteger(Infinity); // => 1.7976931348623157e+308
|
||||
* toInteger('3.2'); // => 3
|
||||
* toInteger(Symbol.iterator); // => 0
|
||||
* toInteger(NaN); // => 0
|
||||
*/
|
||||
function toInteger(value) {
|
||||
const finite = toFinite(value);
|
||||
const remainder = finite % 1;
|
||||
return remainder ? finite - remainder : finite;
|
||||
}
|
||||
//#endregion
|
||||
export { toInteger };
|
||||
Loading…
Add table
Add a link
Reference in a new issue