UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

5 lines (4 loc) 174 B
import { isCallable } from './isCallable.js'; export function isPromise(val) { return typeof val === 'object' && val !== null && 'then' in val && isCallable(val.then); }