Socket
Book a DemoInstallSign in
Socket

call-back

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

call-back

node style callback uitl.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

call-back

node style callback util.

Why?!

Most of the CLI app I have made with node have a common pattern:

output(data, function(err, result) {
	if (!err) {
		console.log(result)
	} else {
		throw new Error(err);
	}
});

Wanted to reduce it:

output(data, cb);

Install

$ npm install --save call-back

Usage

var cb = require('call-back');

output(data, cb); 
// ^ where output is a module that as node-style callback.

License

MIT © Hemanth.HM

Keywords

util

FAQs

Package last updated on 13 Oct 2015

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