Extends socket.io with a wildcard event.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

socket.io-wildcard build status devDependency Status

Extends socket.io with a wildcard event.

Examples

var socketio = require( 'socket.io' ),
    socketioWildcard = require( 'socket.io-wildcard' ),
    io = socketioWildcard( socketio ).listen( 8000 );

io.sockets.on( 'connection', function onConnection ( socket ) {
  socket.on( '*', function onWildcard ( event ) {
    // > { name: 'cake', args: [ { 'is a lie': true }, 'another argument' ] }
    console.log( event );
  } );

  socket.emit( 'cake', { 'is a lie': true }, 'another argument' );
} );