1.0.3 • Published 5 years ago
@adcharity/catch-promise v1.0.3
catch-promise
Catch all uncaught promises easily
Features
This project is honestly useless but I'm lazy and I'll likely forget to catch promises so this is my simple solution
Usage
- Include the package either at the top of your node.js file or in the body of an HTML page.
- (Optional): Define a function used to display caught promises; console.log is used by default
catchPromise.init()
index.js
// Example
const catchPromise = require('@adcharity/catch-promise')
const utils = require('./utils')
catchPromise.define(utils.log)
catchPromise.init()