redux-act
Version:
An opinionated lib to create actions and reducers for Redux
18 lines (13 loc) • 626 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = asError;
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function asError(action) {
if (_typeof(action) === 'object' && action !== null) {
action.error = true;
}
return action;
}
;