try-call
v0.0.2
Published
Functional try-catch
Downloads
7,369
Readme
try-call
Functional try-catch for cleaner code & optimization.
Install
$ npm install try-call
Usage
var call = require('try-call');
var doc = '{ "foo": 123 }';
var parse = JSON.parse.bind(null, doc);
call(parse, function (error, doc) {
error
// => undefined
doc
// => { foo: 123}
})