[CI Skip] 0.6.5
This commit is contained in:
+3
-3
@@ -23,13 +23,13 @@ assert (test: boolean, message: string, code: number = ExtError.CODES.ASSERT, da
|
||||
```
|
||||
|
||||
|
||||
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.
|
||||
|
||||
```js
|
||||
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
|
||||
```
|
||||
|
||||
## Logger
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/util",
|
||||
"version": "0.6.4",
|
||||
"version": "0.6.5",
|
||||
"description": "A collection of useful utilities for @polkadot",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
|
||||
Reference in New Issue
Block a user