New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/util-invariant

Package Overview
Dependencies
Maintainers
12
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/util-invariant - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0-alpha.0

dist/types/index.d.ts

6

CHANGELOG.md
# @onflow/util-invariant
## 1.2.0-alpha.0
### Minor Changes
- TS build
## 1.1.0

@@ -4,0 +10,0 @@

18

dist/util-invariant.js

@@ -12,12 +12,12 @@ 'use strict';

*/
function invariant(fact, msg) {
if (!fact) {
const error = new Error(`INVARIANT ${msg}`);
error.stack = error.stack.split("\n").filter(d => !/at invariant/.test(d)).join("\n");
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
rest[_key - 2] = arguments[_key];
function invariant(fact, msg, ...rest) {
if (!fact) {
const error = new Error(`INVARIANT ${msg}`);
error.stack = error.stack
.split("\n")
.filter(d => !/at invariant/.test(d))
.join("\n");
console.error("\n\n---\n\n", error, "\n\n", ...rest, "\n\n---\n\n");
throw error;
}
console.error("\n\n---\n\n", error, "\n\n", ...rest, "\n\n---\n\n");
throw error;
}
}

@@ -24,0 +24,0 @@

@@ -8,12 +8,12 @@ /**

*/
function invariant(fact, msg) {
if (!fact) {
const error = new Error(`INVARIANT ${msg}`);
error.stack = error.stack.split("\n").filter(d => !/at invariant/.test(d)).join("\n");
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
rest[_key - 2] = arguments[_key];
function invariant(fact, msg, ...rest) {
if (!fact) {
const error = new Error(`INVARIANT ${msg}`);
error.stack = error.stack
.split("\n")
.filter(d => !/at invariant/.test(d))
.join("\n");
console.error("\n\n---\n\n", error, "\n\n", ...rest, "\n\n---\n\n");
throw error;
}
console.error("\n\n---\n\n", error, "\n\n", ...rest, "\n\n---\n\n");
throw error;
}
}

@@ -20,0 +20,0 @@

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["onflowUtil-invariant"] = {}));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["onflowUtil-invariant"] = {}));
})(this, (function (exports) { 'use strict';
/**
* Asserts fact is true, otherwise throw an error with invariant message
* @param {boolean} fact
* @param {string} msg
* @param {Array} rest
* @returns {void}
*/
function invariant(fact, msg) {
if (!fact) {
const error = new Error(`INVARIANT ${msg}`);
error.stack = error.stack.split("\n").filter(d => !/at invariant/.test(d)).join("\n");
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
rest[_key - 2] = arguments[_key];
}
console.error("\n\n---\n\n", error, "\n\n", ...rest, "\n\n---\n\n");
throw error;
/**
* Asserts fact is true, otherwise throw an error with invariant message
* @param {boolean} fact
* @param {string} msg
* @param {Array} rest
* @returns {void}
*/
function invariant(fact, msg, ...rest) {
if (!fact) {
const error = new Error(`INVARIANT ${msg}`);
error.stack = error.stack
.split("\n")
.filter(d => !/at invariant/.test(d))
.join("\n");
console.error("\n\n---\n\n", error, "\n\n", ...rest, "\n\n---\n\n");
throw error;
}
}
}
exports.invariant = invariant;
exports.invariant = invariant;
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=util-invariant.umd.js.map
{
"name": "@onflow/util-invariant",
"version": "1.1.0",
"version": "1.2.0-alpha.0",
"description": "Flow JS SDK Util -- Invariant",

@@ -16,10 +16,11 @@ "license": "Apache-2.0",

"devDependencies": {
"@onflow/fcl-bundle": "^1.3.0",
"@onflow/types": "^1.1.0",
"@onflow/fcl-bundle": "^1.4.0-alpha.0",
"@onflow/types": "^1.2.0-alpha.0",
"jest": "^29.5.0"
},
"source": "src/index.js",
"source": "src/index.ts",
"main": "dist/util-invariant.js",
"module": "dist/util-invariant.module.js",
"unpkg": "dist/util-invariant.umd.js",
"types": "dist/types/index.d.ts",
"scripts": {

@@ -26,0 +27,0 @@ "prepublishOnly": "npm test && npm run build",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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