https://github.com/magicdawn/log-reject-error
Dead Simple unhandledRejection handler
https://github.com/magicdawn/log-reject-error
loud-rejection promise reject unhandled-rejection
Last synced: about 2 months ago
JSON representation
Dead Simple unhandledRejection handler
- Host: GitHub
- URL: https://github.com/magicdawn/log-reject-error
- Owner: magicdawn
- License: mit
- Created: 2017-03-10T08:08:01.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T09:19:54.000Z (12 months ago)
- Last Synced: 2025-03-22T09:34:48.106Z (2 months ago)
- Topics: loud-rejection, promise, reject, unhandled-rejection
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# log-reject-error
> Dead Simple unhandledRejection handler[](https://travis-ci.org/magicdawn/log-reject-error)
[](https://codecov.io/gh/magicdawn/log-reject-error)
[](https://www.npmjs.com/package/log-reject-error)
[](https://www.npmjs.com/package/log-reject-error)
[](http://magicdawn.mit-license.org)## Note
Use this module in start of Application / Script / Framework, not in any library.
Just like [loud-rejection](https://github.com/sindresorhus/loud-rejection) do.## Install
```sh
$ npm i log-reject-error --save
```## API
```js
const logRejectError = require('log-reject-error')
logRejectError(log) // log defaults to `console.error`
```### `register`
```js
require('log-reject-error/register')// equals to
require('log-reject-error')()// convenient for ES6 import
import 'log-reject-error/register'
```## Changelog
[CHANGELOG.md](CHANGELOG.md)## License
the MIT License http://magicdawn.mit-license.org