@mapcss/preset-svg
Version:
SVG as CSS for MapCSS
20 lines (19 loc) • 349 B
JavaScript
/**
* Whatever argument is `Error` or not
*
* @param val - Input any value
* @returns The result of `value instanceof Error`
*
* @example
* ```ts
* import { isError } from './mod.ts'
* isError(Error()) // true
* isError({}) // false
* ```
*
* @beta
*/
function isError(value) {
return value instanceof Error;
}
export { isError };