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
39
frontend/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
generated
vendored
Normal file
39
frontend/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
//#region src/compat/predicate/isPlainObject.ts
|
||||
/**
|
||||
* Checks if a given value is a plain object.
|
||||
*
|
||||
* A plain object is an object created by the `{}` literal, `new Object()`, or
|
||||
* `Object.create(null)`.
|
||||
*
|
||||
* This function also handles objects with custom
|
||||
* `Symbol.toStringTag` properties.
|
||||
*
|
||||
* `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the
|
||||
* default string description of objects.
|
||||
*
|
||||
* @param [object] - The value to check.
|
||||
* @returns True if the value is a plain object, otherwise false.
|
||||
*
|
||||
* @example
|
||||
* console.log(isPlainObject({})); // true
|
||||
* console.log(isPlainObject([])); // false
|
||||
* console.log(isPlainObject(null)); // false
|
||||
* console.log(isPlainObject(Object.create(null))); // true
|
||||
* console.log(isPlainObject(new Map())); // false
|
||||
*/
|
||||
function isPlainObject(object) {
|
||||
if (typeof object !== "object") return false;
|
||||
if (object == null) return false;
|
||||
if (Object.getPrototypeOf(object) === null) return true;
|
||||
if (Object.prototype.toString.call(object) !== "[object Object]") {
|
||||
const tag = object[Symbol.toStringTag];
|
||||
if (tag == null) return false;
|
||||
if (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;
|
||||
return object.toString() === `[object ${tag}]`;
|
||||
}
|
||||
let proto = object;
|
||||
while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
|
||||
return Object.getPrototypeOf(object) === proto;
|
||||
}
|
||||
//#endregion
|
||||
export { isPlainObject };
|
||||
Loading…
Add table
Add a link
Reference in a new issue