🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

cbw

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbw

callback wrapper

1.4.1
latest
Source
npm
Version published
Weekly downloads
3.9K
1.09%
Maintainers
0
Weekly downloads
 
Created
Source

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

Keywords

callback

FAQs

Package last updated on 06 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts