cbw

1.3.1 • Public • Published

cbw

npm version Build Status

Callback wrapper for cleaner async code. Main benefit is you don't need to write if (err) return cb(err).

Usage

var cbw = require('cbw');

var doSomething = function(cb) {
  getUsers(cbw(cb)(function(users) {
    getArticles(cbw(cb)(function(articles) {
      cb(null, [users, articles]);
    }));
  }));
};

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i cbw

Weekly Downloads

8,104

Version

1.3.1

License

MIT

Unpacked Size

7.3 kB

Total Files

9

Last publish

Collaborators

  • runk
  • alexandria