UNPKG

crocks

Version:

A collection of well known Algebraic Datatypes for your utter enjoyment.

14 lines (10 loc) 307 B
/** @license ISC License (c) copyright 2017 original and current authors */ /** @author Ian Hofmann-Hicks (evil) */ var isFunction = require('./isFunction') // isPromise : a -> Boolean function isPromise(p) { return !!p && isFunction(p.then) && isFunction(p.catch) } module.exports = isPromise