UNPKG

@towercg2/server

Version:

The server runtime for the TowerCG2 video graphics system.

20 lines (19 loc) 675 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const lodash_1 = __importDefault(require("lodash")); const redux_1 = require("redux"); const ticks = (state = {}, action) => { switch (action.type) { case "@@TickPlugin/INCREMENT_TICK": const { tickerName } = action.payload; const v = state[tickerName] || 0; return lodash_1.default.merge({}, state, { [tickerName]: v + 1 }); } return state; }; exports.reducer = redux_1.combineReducers({ ticks });