Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot/util

Package Overview
Dependencies
Maintainers
1
Versions
1411
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/util - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

12

assert.js

@@ -11,8 +11,8 @@ 'use strict';

@description
Checks that `test` is a true value. If value is `false` (or `false-ish`), it throws an ExtError with the supplied `message` and an optional `code` and `data`. When `test` passes, `true` is returned.
Checks that `test` is a truthy value. If value is falsy (`null`, `undefined`, `false`, ...), it throws an ExtError with the supplied `message` and an optional `code` and `data`. When `test` passes, `true` is returned.
@example
const assert = require('@polkadot/util/assert');
assert(true === true, 'True should be true'); // true returned
assert(false === true, 'False should not be true'); // ExtError thrown
assert(true, 'True should be true'); // true returned
assert(false, 'False should not be true'); // ExtError thrown
*/

@@ -23,7 +23,7 @@ module.exports = function assert(test, message) {

if (!test) {
throw new ExtError(message, code, data);
if (test) {
return true;
}
return true;
throw new ExtError(message, code, data);
};
{
"name": "@polkadot/util",
"version": "0.6.4",
"version": "0.6.5",
"description": "A collection of useful utilities for @polkadot",

@@ -32,4 +32,4 @@ "main": "index.js",

"devDependencies": {
"@polkadot/api-jsonrpc": "^0.5.5",
"@polkadot/dev": "^0.12.4"
"@polkadot/api-jsonrpc": "^0.5.9",
"@polkadot/dev": "^0.12.5"
},

@@ -36,0 +36,0 @@ "dependencies": {

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