UNPKG

@textea/y-socket.io

Version:
23 lines (18 loc) 834 B
/// <reference types="./awareness.d.ts" /> (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.YSocketIO = {})); })(this, (function (exports) { 'use strict'; const getClients = (awareness)=>[ ...awareness.getStates().keys() ]; const getOtherClients = (awareness)=>{ const clients = getClients(awareness); return clients.filter((clientId)=>clientId !== awareness.clientID); }; exports.getClients = getClients; exports.getOtherClients = getOtherClients; Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=awareness.js.map