1.0.3 • Published 5 years ago

@adcharity/catch-promise v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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

  1. Include the package either at the top of your node.js file or in the body of an HTML page.
  2. (Optional): Define a function used to display caught promises; console.log is used by default
  3. catchPromise.init()

index.js

// Example
const catchPromise = require('@adcharity/catch-promise')
const utils = require('./utils')

catchPromise.define(utils.log)
catchPromise.init()
1.0.2

5 years ago

1.0.1

5 years ago

1.0.3

5 years ago

1.0.0

5 years ago