reports/frontend/node_modules/es-toolkit/dist/predicate/isBlob.mjs
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

23 lines
620 B
JavaScript

//#region src/predicate/isBlob.ts
/**
* Checks if the given value is a Blob.
*
* This function tests whether the provided value is an instance of `Blob`.
* It returns `true` if the value is an instance of `Blob`, and `false` otherwise.
*
* @param x - The value to test if it is a Blob.
* @returns True if the value is a Blob, false otherwise.
*
* @example
* const value1 = new Blob();
* const value2 = {};
*
* console.log(isBlob(value1)); // true
* console.log(isBlob(value2)); // false
*/
function isBlob(x) {
if (typeof Blob === "undefined") return false;
return x instanceof Blob;
}
//#endregion
export { isBlob };