UNPKG

kevoree-group-centralizedws

Version:

WebSocket group based on a centralized architecture that only sends partial model to connected clients

12 lines (11 loc) 224 B
module.exports = function dedupe(arr) { const obj = {}; const deduped = []; for (let i = 0; i < arr.length; i++) { obj[arr[i]] = true; } for (const key in obj) { deduped.push(key); } return deduped; };