blob: 26270bc758bd7fda106cf55ad324665c7927b7bf [file] [log] [blame]
Matteo Scandoloe3ed0162016-12-01 10:09:12 -08001(function () {
2 'use strict';
3 const _ = require('lodash');
4 const clients = [];
5
6 exports.clients = clients;
7
8 exports.add = (client) => {
9 // TODO check id that client is already there
10 if(!_.find(clients, ({id: client.id}))) {
11 clients.push(client);
12 }
13 }
14
15 exports.remove = (client) => {
16 _.remove(clients, {id: client.id});
17 }
18})();