Socket
Socket
Sign inDemoInstall

hard-rejection

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

19

index.d.ts

@@ -1,6 +0,15 @@

/**
Make unhandled promise rejections fail hard right away instead of the default [silent fail](https://gist.github.com/benjamingr/0237932cee84712951a2).
declare const hardRejection: {
/**
Make unhandled promise rejections fail hard right away instead of the default [silent fail](https://gist.github.com/benjamingr/0237932cee84712951a2).
@param log - Custom logging function to print the rejected promise. Receives the error stack. Default: `console.error`.
*/
export default function hardRejection(log?: (stack?: string) => void): void;
@param log - Custom logging function to print the rejected promise. Receives the error stack. Default: `console.error`.
*/
(log?: (stack?: string) => void): void;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function hardRejection(log?: (stack?: string) => void): void;
// export = hardRejection;
default: typeof hardRejection;
};
export = hardRejection;

@@ -24,2 +24,3 @@ 'use strict';

module.exports = hardRejection;
// TODO: Remove this for the next major release
module.exports.default = hardRejection;
{
"name": "hard-rejection",
"version": "2.0.0",
"version": "2.1.0",
"description": "Make unhandled promise rejections fail hard right away instead of the default silent fail",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -43,7 +43,7 @@ "files": [

"devDependencies": {
"ava": "^1.3.1",
"ava": "^1.4.1",
"execa": "^1.0.0",
"tsd-check": "^0.5.0",
"tsd": "^0.7.1",
"xo": "^0.24.0"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc