0.1.1 • Published 2 years ago

tbparty v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

tbparty

A socket.io wrapper for connecting to https://trollbox.party/

Example

var io = require('tbparty');

var pref = "!";
var socket = io(/* leave empty */);
socket.emit("user joined", "cool guy", "red", "", "");
socket.on("message", function(data){
    console.log(data);
    if (data.msg == pref+"test"){
        socket.send('it works');
    }
});

How to use on an existing project

Simply, switch the require('socket.io-client') to require('tbparty') and make sure to leave the io() function empty like this:

var socket = io();
0.1.0

2 years ago

0.1.1

2 years ago

0.0.4

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago