catchup
v1.0.0
Published
Graceful error handling. Because core `domain` module is deprecated. This share almost the same API.
Downloads
5
Readme
catchup
Graceful error handling. Because core domain module is deprecated. Shares almost the same API.
Install
npm i catchup --save
Usage
For more use-cases see the tests
var fs = require('fs')
var domain = require('catchup').create()
domain.once('error', function (err) {
console.log('central error handling, ftw!', err)
})
domain.run(function () {
fs.createReadStream('not_existing_file')
})
Related
- benz: Compose your control flow with absolute elegance. Support async/await, callbacks, thunks, generators, promises, observables, child processes and streams. Can power applications that need to have plugins. Useful for creating task, test and bench runners.
- dush: Minimalist 1.5kb event delegation for the browser (IE8+) and nodejs.
- hybridify: Building hybrid APIs. You can use both callback and promise in same time. Like
asyncFn(name, cb).then().catch()
- is-emitter: Check that given value is EventEmitter, not so strict as
is-node-emitter
. - merz: Wrapper to handle completion and errors of sync and async functions, promises, generators, streams, observables and child processes.
- vez: Middleware composition at new level. Ultimate alternative to
ware
,plugins
,koa-compose
andcomposition
packages. Allows you to use callbacks, promises, generators and async/await functions as middlewares.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.