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
32
frontend/node_modules/es-toolkit/dist/predicate/isJSON.d.mts
generated
vendored
Normal file
32
frontend/node_modules/es-toolkit/dist/predicate/isJSON.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//#region src/predicate/isJSON.d.ts
|
||||
/**
|
||||
* Checks if a given value is a valid JSON string.
|
||||
*
|
||||
* A valid JSON string is one that can be successfully parsed using `JSON.parse()`. According to JSON
|
||||
* specifications, valid JSON can represent:
|
||||
* - Objects (with string keys and valid JSON values)
|
||||
* - Arrays (containing valid JSON values)
|
||||
* - Strings
|
||||
* - Numbers
|
||||
* - Booleans
|
||||
* - null
|
||||
*
|
||||
* String values like `"null"`, `"true"`, `"false"`, and numeric strings (e.g., `"42"`) are considered
|
||||
* valid JSON and will return true.
|
||||
*
|
||||
* This function serves as a type guard in TypeScript, narrowing the type of the argument to `string`.
|
||||
*
|
||||
* @param value The value to check.
|
||||
* @returns Returns `true` if `value` is a valid JSON string, else `false`.
|
||||
*
|
||||
* @example
|
||||
* isJSON('{"name":"John","age":30}'); // true
|
||||
* isJSON('[1,2,3]'); // true
|
||||
* isJSON('true'); // true
|
||||
* isJSON('invalid json'); // false
|
||||
* isJSON({ name: 'John' }); // false (not a string)
|
||||
* isJSON(null); // false (not a string)
|
||||
*/
|
||||
declare function isJSON(value: unknown): value is string;
|
||||
//#endregion
|
||||
export { isJSON };
|
||||
Loading…
Add table
Add a link
Reference in a new issue