dms-report
Simple library for reporting to Dead Man's Snitch.
Returns promises only. Standard callbacks are not supported. Though optionally you can just "fire and forget" and discard the returned promise - in this case, delivery isn't guaranteed, but is still likely.
You can either report manually, or wrap an existing promise-returning function.
If using wrapBlocking
, please be aware that the result of the reporting process is not exposed. The process will block for a maximum of 5 seconds.
const dms = ; // indicates successawait dms; // success with a messageawait dms; // if you have error notices enabled, indicates failureawait dms; // wrap an existing promise-returning function and report the outcome// - promise resolved -> success with no message// - promise rejected -> failure with `error.message` as the messageasync { return await ;} // if doing e.g. `obj.foo`, you may need to do `obj.foo.bind(obj)`const wrapped = dms; const result = await ; // for environments which must block during the reporting processconst wrapped = dms;
Installation
$ npm install dms-report
Support
Please open an issue on this repository.
Authors
- James Billingham james@jamesbillingham.com
License
MIT licensed - see LICENSE file