socket.io-manually-created-rooms

Get a list of the socket.io rooms created manually. It omits the user id rooms automatically created by socket.io.

Usage no npm install needed!

<script type="module">
  import socketIoManuallyCreatedRooms from 'https://cdn.skypack.dev/socket.io-manually-created-rooms';
</script>

README

Takes the reference of a namespace as an argument and returns an array of objects containing information about the rooms created manually.

const getManuallyCreatedRooms = require('socket.io-manually-created-rooms')

// io provides the reference to the namespace
var manuallyCreatedRooms = getManuallyCreatedRooms(io)