Opal-Estate-Pro/node_modules/is-promise/index.js

6 lines
165 B
JavaScript
Raw Normal View History

2019-09-13 04:44:33 +02:00
module.exports = isPromise;
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}