Socket
Socket
Sign inDemoInstall

ts-invariant

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-invariant - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

lib/invariant.esm.js

16

lib/invariant.js

@@ -1,4 +0,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib = require('tslib');
var genericMessage = "Invariant Violation";

@@ -10,3 +13,3 @@ var _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {

var InvariantError = /** @class */ (function (_super) {
tslib_1.__extends(InvariantError, _super);
tslib.__extends(InvariantError, _super);
function InvariantError(message) {

@@ -22,3 +25,2 @@ if (message === void 0) { message = genericMessage; }

}(Error));
exports.InvariantError = InvariantError;
function invariant(condition, message) {

@@ -29,3 +31,5 @@ if (!condition) {

}
exports.default = invariant;
exports.InvariantError = InvariantError;
exports.invariant = invariant;
exports.default = invariant;
{
"name": "ts-invariant",
"version": "0.1.0",
"version": "0.1.1",
"author": "Ben Newman <ben@apollographql.com>",

@@ -8,2 +8,3 @@ "description": "TypeScript implementation of invariant(condition, message)",

"main": "lib/invariant.js",
"module": "lib/invariant.esm.js",
"types": "lib/invariant.d.ts",

@@ -25,3 +26,3 @@ "keywords": [

"scripts": {
"build": "tsc",
"build": "tsc && rollup -c",
"mocha": "mocha --reporter spec --full-trace lib/tests.js",

@@ -37,5 +38,7 @@ "prepublish": "npm run build",

"invariant": "^2.2.4",
"mocha": "^5.2.0"
"mocha": "^5.2.0",
"rollup": "^1.1.2",
"rollup-plugin-typescript2": "^0.19.2"
},
"gitHead": "24a7e77f5681e84d811ca54581c02053089ceb78"
"gitHead": "549824faa00319acbdc0d932aed0475f6aa77b51"
}

@@ -7,3 +7,3 @@ const genericMessage = "Invariant Violation";

},
} = Object;
} = Object as any;

@@ -10,0 +10,0 @@ export class InvariantError extends Error {

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