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 - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

10

browser.js
'use strict';
var core = require('./core');
function unwrapEvent(event) {
if (event && event.detail && event.detail.promise) {
return event.detail;
}
return event;
}
module.exports = function (w) {

@@ -9,2 +17,3 @@ w = w || window;

w.addEventListener('unhandledrejection', function (event) {
event = unwrapEvent(event);
c.onUnhandledRejection(event.reason, event.promise);

@@ -14,2 +23,3 @@ });

w.addEventListener('rejectionhandled', function (event) {
event = unwrapEvent(event);
c.onRejectionHandled(event.promise);

@@ -16,0 +26,0 @@ });

7

package.json
{
"name": "currently-unhandled",
"version": "0.3.0",
"version": "0.4.0",
"description": "Track the list of currently unhandled promise rejections.",

@@ -33,2 +33,3 @@ "license": "MIT",

"ava": "^0.15.1",
"bluebird": "^3.4.0",
"browserify": "^13.0.1",

@@ -41,2 +42,3 @@ "coveralls": "^2.11.9",

"karma-chrome-launcher": "^1.0.1",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.0.1",

@@ -61,2 +63,5 @@ "mocha": "^2.5.3",

"xo": {
"ignores": [
"browser-bluebird-test.js"
],
"envs": [

@@ -63,0 +68,0 @@ "browser",

@@ -38,4 +38,8 @@ # currently-unhandled [![Build Status](https://travis-ci.org/jamestalmage/currently-unhandled.svg?branch=master)](https://travis-ci.org/jamestalmage/currently-unhandled) [![Coverage Status](https://coveralls.io/repos/github/jamestalmage/currently-unhandled/badge.svg?branch=master)](https://coveralls.io/github/jamestalmage/currently-unhandled?branch=master)

## Browser Support
This module can be bundled with `browserify`. At time of writing, it will work with native Promises in the Chrome browser only. For best cross-browser support, use `bluebird` instead of native Promise support in browsers.
## License
MIT © [James Talmage](http://github.com/jamestalmage)
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