UNPKG

@stackend/api

Version:

JS bindings to api.stackend.com

10 lines 433 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function createReducer(initialState, handlers) { return function reducer(state, action) { if (state === void 0) { state = initialState; } return Object.prototype.hasOwnProperty.call(handlers, action.type) ? handlers[action.type](state, action) : state; }; } exports.default = createReducer; //# sourceMappingURL=createReducer.js.map