redux-code
Version:
Redux helpers for actions and reducers
21 lines (20 loc) • 555 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.skipMiddleware = exports.SKIP = void 0;
/**
*
* A special object to make an ability to skip actions.
* This is only can be used with skipMiddleware
*/
exports.SKIP = { type: null };
const skipMiddleware = function () {
return function (next) {
return function (action) {
if (action === exports.SKIP) {
return action;
}
return next(action);
};
};
};
exports.skipMiddleware = skipMiddleware;