isPromise.js 178 Bytes Raw Blame History Permalink 1 2 3 4 5 6 'use strict'; function isPromise(val) { return !!val && (typeof val === 'object' || typeof val === 'function') && typeof val.then === 'function'; } module.exports = isPromise;