1.0.2 • Published 11 years ago

sawkit-node v1.0.2

Weekly downloads
7
License
-
Repository
github
Last release
11 years ago

sawKit-node

A back-end Facade over the popular 'ws' module for Node, allowing for event emissions and custom event reception.

Quick-Start

    var $ws = require('sawkit-node');
    
    $ws({port: 8080}).ready(function($ws, ws){
      
      $ws.send('Tonight at 9...')
        .send({msg: 'tonight at 9...'})
        .emit('news', {message: 'WARNING! Flash-flood!'})
        .emit('news', 'TORNADOW WARNING!');
      
      $ws.on('news', function(data){
          console.log('NEWS!', data, typeof data);
        })
        .on('message', function(data){
          console.log('MESSAGE!', data, typeof data);
        });
      
    });

METHODS

COMING SOON!

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago