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