[CI Skip] 0.6.7
This commit is contained in:
+2
-1
@@ -19,7 +19,7 @@ Utility methods for this package are split into groups
|
||||
Checks for a valid test, if not ExtError is thrown.
|
||||
|
||||
```js
|
||||
assert (test: boolean, message: string, code: number = ExtError.CODES.ASSERT, data: any): void
|
||||
assert (test: any, message: string | () => string, code: number = ExtError.CODES.ASSERT, data: any): void
|
||||
```
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ const assert = require('@polkadot/util/assert');
|
||||
|
||||
assert(true, 'True should be true'); // true returned
|
||||
assert(false, 'False should not be true'); // ExtError thrown
|
||||
assert(false, () => 'message'); // ExtError with 'message'
|
||||
```
|
||||
|
||||
## Logger
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ numberToBuffer (value?: number): Buffer
|
||||
```js
|
||||
import { numberToBuffer } from '@polkadot/util';
|
||||
|
||||
const buffer = numberToBuffer('0x1234'); // => Buffer.from([0x12, 0x34])
|
||||
const buffer = numberToBuffer(0x1234); // => Buffer.from([0x12, 0x34])
|
||||
```
|
||||
|
||||
## numberToHex
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/util",
|
||||
"version": "0.6.6",
|
||||
"version": "0.6.7",
|
||||
"description": "A collection of useful utilities for @polkadot",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
|
||||
Reference in New Issue
Block a user