Socket
Socket
Sign inDemoInstall

nullthrows

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

nullthrows.d.ts

@@ -5,2 +5,2 @@ /**

export default function nullthrows<T>(value?: T | null): T;
export default function nullthrows<T>(value?: T | null, message?: string): T;

@@ -5,7 +5,7 @@ 'use strict';

exports.default = function nullthrows(x) {
exports.default = function nullthrows(x, message) {
if (x != null) {
return x;
}
throw new Error('Got unexpected null or undefined');
throw new Error(message !== undefined ? message : 'Got unexpected null or undefined');
};
{
"name": "nullthrows",
"version": "1.0.1",
"version": "1.0.2",
"description": "flow typed nullthrows",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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