Nesting Penguins Molt

    @sekhmetdev/busyjs

    0.0.1 • Public • Published

    Busy.js

    A lightweight JavaScript library for Busy

    Install

    npm install busyjs --save
    

    Usage

    var busy = require('busyjs');
    
    // Init WebSocket client
    var client = new busy.Client('wss://gtg.steem.house:8090');
    
    // Get accounts
    client.call('get_accounts', ['fabien'], function(err, result) {
      console.log(err, result);
    });

    See more examples

    Promises

    You can also use Busy.js with promises by promisifying busy with bluebird as in:

    var busy = require('busyjs');
    bluebird.promisifyAll(busy.Client.prototype);

    It'll add a Async to all busy functions (e.g. return client.callAsync().then())

    // So instead of writing client.request('get_accounts', ['fabien'], cb); you have to write:
    return client.callAsync('get_accounts', ['fabien']).then(function(result) {
      console.log(result); // => [{ id: 26921, name: 'fabien' ...]
    });

    License

    MIT.

    Keywords

    none

    Install

    npm i @sekhmetdev/busyjs

    DownloadsWeekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    6.68 kB

    Total Files

    6

    Last publish

    Collaborators

    • sekhmet