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/predicate/isNative.mjs
generated
vendored
Normal file
26
frontend/node_modules/es-toolkit/dist/compat/predicate/isNative.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//#region src/compat/predicate/isNative.ts
|
||||
const functionToString = Function.prototype.toString;
|
||||
/** Used to detect if a method is native. */
|
||||
const IS_NATIVE_FUNCTION_REGEXP = RegExp(`^${functionToString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?")}$`);
|
||||
/**
|
||||
* Checks if a given value is a native function.
|
||||
*
|
||||
* This function tests whether the provided value is a native function implemented by the JavaScript engine.
|
||||
* It returns `true` if the value is a native function, and `false` otherwise.
|
||||
*
|
||||
* @param value - The value to test for native function.
|
||||
* @returns `true` if the value is a native function, `false` otherwise.
|
||||
*
|
||||
* @example
|
||||
* const value1 = Array.prototype.push;
|
||||
* const value2 = () => {};
|
||||
* const result1 = isNative(value1); // true
|
||||
* const result2 = isNative(value2); // false
|
||||
*/
|
||||
function isNative(value) {
|
||||
if (typeof value !== "function") return false;
|
||||
if (globalThis?.["__core-js_shared__"] != null) throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
|
||||
return IS_NATIVE_FUNCTION_REGEXP.test(functionToString.call(value));
|
||||
}
|
||||
//#endregion
|
||||
export { isNative };
|
||||
Loading…
Add table
Add a link
Reference in a new issue