Skip to content
Permalink
Newer
Older
100644 6 lines (5 sloc) 201 Bytes
Ignoring revisions in .git-blame-ignore-revs.
May 4, 2020 18:50
1
module.exports = isPromise;
2
module.exports.default = isPromise;
3
4
function isPromise(obj) {
5
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
6
}