UNPKG

@towercg2/server

Version:

The server runtime for the TowerCG2 video graphics system.

18 lines (17 loc) 596 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 clients = (state = {}, action) => { switch (action.type) { case "@@RosterPlugin/UPDATE_CLIENTS": return lodash_1.default.fromPairs(action.payload.map((c) => [c.clientId, c])); } return state; }; exports.reducer = redux_1.combineReducers({ clients });