Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

currently-unhandled

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currently-unhandled

Track the list of currently unhandled promise rejections.

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8M
decreased by-11.57%
Maintainers
1
Weekly downloads
 
Created

What is currently-unhandled?

The currently-unhandled npm package is used to track unhandled promise rejections in Node.js. It provides a way to log or handle promise rejections that might otherwise go unnoticed. This can be particularly useful for debugging and for applications that need to ensure all errors are accounted for.

What are currently-unhandled's main functionalities?

Tracking unhandled rejections

This feature allows you to track unhandled promise rejections. By using the currentlyUnhandled() function, you can retrieve an array of promises that were rejected and not yet handled at the time of the call.

const currentlyUnhandled = require('currently-unhandled')();

process.on('unhandledRejection', (reason, promise) => {
  console.log('Unhandled Rejection at:', promise, 'reason:', reason);
  // Application specific logging, throwing an error, or other logic here
});

// Later in the code, you can check for unhandled rejections
const unhandledRejections = currentlyUnhandled();
console.log(unhandledRejections);

Other packages similar to currently-unhandled

Keywords

FAQs

Package last updated on 02 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc