domain-capture
decorates a function in a domain
Installing
npm install domain-capture
Example
var emitter = new EventEmitter;var capture = ; { ; // trigger a domain error, which will call fn(err) emitter; console; ; // not called} // decorate `error` functionvar fn = ; // invoke function where the error occurs;
API
capture(fn)
Decorates an async fn
inside a domain
context, disposes the domain and callbacks
the error if any.
License
MIT