cbw
callback wrapper
Last updated 22 days ago by alexandria .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cbw 
SYNC missed versions from official npm registry.

cbw 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

Current Tags

  • 1.0.0                                ...           latest (22 days ago)

6 Versions

  • 1.0.0                                ...           22 days ago
  • 0.0.7                                ...           22 days ago
  • 0.0.6                                ...           3 months ago
  • 0.0.5                                ...           3 months ago
  • 0.0.4                                ...           3 months ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 23
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |