catchup

Graceful error handling. Because core `domain` module is deprecated. This share almost the same API.

Usage no npm install needed!

<script type="module">
  import catchup from 'https://cdn.skypack.dev/catchup';
</script>

README

catchup npmjs.com The MIT License

Graceful error handling. Because core domain module is deprecated. Shares almost the same API.

code climate standard code style travis build status coverage status dependency status

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 and composition 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.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github