redux-promise-middleware-es3
Version:
Redux middleware for handling promises and optimistic updates with ES3 support
16 lines (12 loc) • 562 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
exports['default'] = isPromise;
function isPromise(value) {
if (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
return value && typeof value.then === 'function';
}
return false;
}