Skip to content

isPromise

Determine whether the input value is a Promise.

Usage

ts
import { isPromise } from 'rattail'

isPromise(Promise.resolve()) // return true
isPromise({}) // return false

Arguments

ArgTypeDefaults
valueany

Return

Type
boolean