UNPKG

telefunc

Version:

Remote functions. Instead of API.

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); }