Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

socket.io-adapter

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io-adapter - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

5

History.md
1.1.0 / 2017-02-26
===================
* [feat] Add addAll method (#49)
1.0.0 / 2017-02-16

@@ -3,0 +8,0 @@ ===================

24

index.js

@@ -44,6 +44,22 @@

Adapter.prototype.add = function(id, room, fn){
this.sids[id] = this.sids[id] || {};
this.sids[id][room] = true;
this.rooms[room] = this.rooms[room] || Room();
this.rooms[room].add(id);
return this.addAll(id, [ room ], fn);
};
/**
* Adds a socket to a list of room.
*
* @param {String} socket id
* @param {String} rooms
* @param {Function} callback
* @api public
*/
Adapter.prototype.addAll = function(id, rooms, fn){
for (var i = 0; i < rooms.length; i++) {
var room = rooms[i];
this.sids[id] = this.sids[id] || {};
this.sids[id][room] = true;
this.rooms[room] = this.rooms[room] || Room();
this.rooms[room].add(id);
}
if (fn) process.nextTick(fn.bind(null, null));

@@ -50,0 +66,0 @@ };

2

package.json
{
"name": "socket.io-adapter",
"version": "1.0.0",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc