[CI Skip] 0.33.29

This commit is contained in:
Travis CI
2019-01-04 13:55:24 +00:00
parent 89030f41b3
commit bff4132b75
195 changed files with 624 additions and 664 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **arrayFilter**(array: *`Array`<`any`>*, allowNulls?: *`boolean`*): `Array`<`any`>
*Defined in [array/filter.ts:24](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/array/filter.ts#L24)*
*Defined in [array/filter.ts:24](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/array/filter.ts#L24)*
*__name__*: arrayFilter
+3 -3
View File
@@ -6,9 +6,9 @@
## assert
▸ **assert**(test: *`any`*, message: * `string` &#124; `MessageFn`*, code?: *`number`*, data?: *`any`*): `boolean`
▸ **assert**(test: *`any`*, message: *`string` | `MessageFn`*, code?: *`number`*, data?: *`any`*): `boolean`
*Defined in [assert.ts:27](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/assert.ts#L27)*
*Defined in [assert.ts:27](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/assert.ts#L27)*
*__name__*: assert
@@ -33,7 +33,7 @@ assert(false, () => 'message'); // ExtError with 'message'
| Name | Type | Default value |
| ------ | ------ | ------ |
| test | `any` | - |
| message | `string` &#124; `MessageFn`| - |
| message | `string` | `MessageFn` | - |
| `Default value` code | `number` | ExtError.CODES.ASSERT |
| `Optional` data | `any` | - |
+3 -3
View File
@@ -6,9 +6,9 @@
## bnToBn
▸ **bnToBn**(value?: * `BN` &#124; `number` &#124; `null`*): `BN`
▸ **bnToBn**(value?: *`BN` | `number` | `null`*): `BN`
*Defined in [bn/toBn.ts:24](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/bn/toBn.ts#L24)*
*Defined in [bn/toBn.ts:24](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/bn/toBn.ts#L24)*
*__name__*: bnToBn
@@ -32,7 +32,7 @@ bnToBn(new BN(0x1234)); // => BN(0x1234)
| Name | Type |
| ------ | ------ |
| `Optional` value | `BN` &#124; `number` &#124; `null`|
| `Optional` value | `BN` | `number` | `null` |
**Returns:** `BN`
+4 -4
View File
@@ -6,9 +6,9 @@
## bnToHex
▸ **bnToHex**(value?: * `BN` &#124; `number` &#124; `null`*, options?: * `number` &#124; `Options`*): `string`
▸ **bnToHex**(value?: *`BN` | `number` | `null`*, options?: *`number` | `Options`*): `string`
*Defined in [bn/toHex.ts:34](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/bn/toHex.ts#L34)*
*Defined in [bn/toHex.ts:34](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/bn/toHex.ts#L34)*
*__name__*: bnToHex
@@ -31,8 +31,8 @@ bnToHex(new BN(0x123456)); // => '0x123456'
| Name | Type | Default value |
| ------ | ------ | ------ |
| `Optional` value | `BN` &#124; `number` &#124; `null`| - |
| `Default value` options | `number` &#124; `Options`| { bitLength: -1, isLe: false, isNegative: false } |
| `Optional` value | `BN` | `number` | `null` | - |
| `Default value` options | `number` | `Options` | { bitLength: -1, isLe: false, isNegative: false } |
**Returns:** `string`
+8 -8
View File
@@ -6,11 +6,11 @@
## bnToU8a
▸ **bnToU8a**(value: * `BN` &#124; `number` &#124; `null`*, options?: *`Options`*): `Uint8Array`
▸ **bnToU8a**(value: *`BN` | `number` | `null`*, options?: *`Options`*): `Uint8Array`
▸ **bnToU8a**(value: * `BN` &#124; `number` &#124; `null`*, bitLength?: * `undefined` &#124; `number`*, isLe?: * `undefined` &#124; `false` &#124; `true`*): `Uint8Array`
▸ **bnToU8a**(value: *`BN` | `number` | `null`*, bitLength?: *`undefined` | `number`*, isLe?: *`undefined` | `false` | `true`*): `Uint8Array`
*Defined in [bn/toU8a.ts:30](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/bn/toU8a.ts#L30)*
*Defined in [bn/toU8a.ts:30](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/bn/toU8a.ts#L30)*
*__name__*: bnToU8a
@@ -32,20 +32,20 @@ bnToU8a(new BN(0x1234)); // => [0x12, 0x34]
| Name | Type |
| ------ | ------ |
| value | `BN` &#124; `number` &#124; `null`|
| value | `BN` | `number` | `null` |
| `Optional` options | `Options` |
**Returns:** `Uint8Array`
*Defined in [bn/toU8a.ts:31](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/bn/toU8a.ts#L31)*
*Defined in [bn/toU8a.ts:31](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/bn/toU8a.ts#L31)*
**Parameters:**
| Name | Type |
| ------ | ------ |
| value | `BN` &#124; `number` &#124; `null`|
| `Optional` bitLength | `undefined` &#124; `number`|
| `Optional` isLe | `undefined` &#124; `false` &#124; `true`|
| value | `BN` | `number` | `null` |
| `Optional` bitLength | `undefined` | `number` |
| `Optional` isLe | `undefined` | `false` | `true` |
**Returns:** `Uint8Array`
+3 -3
View File
@@ -6,9 +6,9 @@
## bufferToU8a
▸ **bufferToU8a**(buffer?: * `Buffer` &#124; `number`[]*): `Uint8Array`
▸ **bufferToU8a**(buffer?: *`Buffer` | `number`[]*): `Uint8Array`
*Defined in [buffer/toU8a.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/buffer/toU8a.ts#L20)*
*Defined in [buffer/toU8a.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/buffer/toU8a.ts#L20)*
*__name__*: bufferToU8a
@@ -30,7 +30,7 @@ bufferToU8a(Buffer.from([1, 2, 3]));
| Name | Type |
| ------ | ------ |
| `Optional` buffer | `Buffer` &#124; `number`[]|
| `Optional` buffer | `Buffer` | `number`[] |
**Returns:** `Uint8Array`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **compactAddLength**(input: *`Uint8Array`*): `Uint8Array`
*Defined in [compact/addLength.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/compact/addLength.ts#L20)*
*Defined in [compact/addLength.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/compact/addLength.ts#L20)*
*__name__*: compactAddLength
+1 -1
View File
@@ -8,7 +8,7 @@
**● DEFAULT_BITLENGTH**: *[BitLength](_compact_types_.md#bitlength)* = 32
*Defined in [compact/defaults.ts:7](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/compact/defaults.ts#L7)*
*Defined in [compact/defaults.ts:7](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/compact/defaults.ts#L7)*
___
+3 -3
View File
@@ -6,9 +6,9 @@
## compactFromU8a
▸ **compactFromU8a**(_input: * `Uint8Array` &#124; `string`*, bitLength?: *[BitLength](_compact_types_.md#bitlength)*): [`number`, `BN`]
▸ **compactFromU8a**(_input: *`Uint8Array` | `string`*, bitLength?: *[BitLength](_compact_types_.md#bitlength)*): [`number`, `BN`]
*Defined in [compact/fromU8a.ts:26](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/compact/fromU8a.ts#L26)*
*Defined in [compact/fromU8a.ts:26](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/compact/fromU8a.ts#L26)*
*__name__*: compactFromU8a
@@ -28,7 +28,7 @@ console.log('value offset=', offset, 'length=', length); // 4, 0xffff
| Name | Type | Default value |
| ------ | ------ | ------ |
| _input | `Uint8Array` &#124; `string`| - |
| _input | `Uint8Array` | `string` | - |
| `Default value` bitLength | [BitLength](_compact_types_.md#bitlength) | DEFAULT_BITLENGTH |
**Returns:** [`number`, `BN`]
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **compactStripLength**(input: *`Uint8Array`*, bitLength?: *[BitLength](_compact_types_.md#bitlength)*): [`number`, `Uint8Array`]
*Defined in [compact/stripLength.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/compact/stripLength.ts#L22)*
*Defined in [compact/stripLength.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/compact/stripLength.ts#L22)*
*__name__*: compactStripLength
+3 -3
View File
@@ -6,9 +6,9 @@
## compactToU8a
▸ **compactToU8a**(_value: * `BN` &#124; `number`*): `Uint8Array`
▸ **compactToU8a**(_value: *`BN` | `number`*): `Uint8Array`
*Defined in [compact/toU8a.ts:27](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/compact/toU8a.ts#L27)*
*Defined in [compact/toU8a.ts:27](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/compact/toU8a.ts#L27)*
*__name__*: compactToU8a
@@ -26,7 +26,7 @@ console.log(compactToU8a(511, 32)); // Uint8Array([0b11111101, 0b00000111])
| Name | Type |
| ------ | ------ |
| _value | `BN` &#124; `number`|
| _value | `BN` | `number` |
**Returns:** `Uint8Array`
+2 -3
View File
@@ -6,10 +6,9 @@
## BitLength
**Ƭ BitLength**: * `8` &#124; `16` &#124; `32` &#124; `64` &#124; `128` &#124; `256`
*
**Ƭ BitLength**: *`8` | `16` | `32` | `64` | `128` | `256`*
*Defined in [compact/types.ts:5](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/compact/types.ts#L5)*
*Defined in [compact/types.ts:5](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/compact/types.ts#L5)*
___
+3 -3
View File
@@ -6,9 +6,9 @@
## hexAddPrefix
▸ **hexAddPrefix**(value: * `string` &#124; `null` &#124; `undefined`*): `string`
▸ **hexAddPrefix**(value: *`string` | `null` | `undefined`*): `string`
*Defined in [hex/addPrefix.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/addPrefix.ts#L22)*
*Defined in [hex/addPrefix.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/addPrefix.ts#L22)*
*__name__*: hexAddPrefix
@@ -30,7 +30,7 @@ console.log('With prefix', hexAddPrefix('0a0b12')); // => 0x0a0b12
| Name | Type |
| ------ | ------ |
| value | `string` &#124; `null` &#124; `undefined`|
| value | `string` | `null` | `undefined` |
**Returns:** `string`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **hexFixLength**(value: *`string`*, bitLength?: *`number`*, withPadding?: *`boolean`*): `string`
*Defined in [hex/fixLength.ts:25](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/fixLength.ts#L25)*
*Defined in [hex/fixLength.ts:25](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/fixLength.ts#L25)*
*__name__*: hexFixLength
+3 -3
View File
@@ -6,9 +6,9 @@
## hexHasPrefix
▸ **hexHasPrefix**(value: * `string` &#124; `null` &#124; `undefined`*): `boolean`
▸ **hexHasPrefix**(value: *`string` | `null` | `undefined`*): `boolean`
*Defined in [hex/hasPrefix.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/hasPrefix.ts#L22)*
*Defined in [hex/hasPrefix.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/hasPrefix.ts#L22)*
*__name__*: hexHasPrefix
@@ -30,7 +30,7 @@ console.log('has prefix', hexHasPrefix('0x1234')); // => true
| Name | Type |
| ------ | ------ |
| value | `string` &#124; `null` &#124; `undefined`|
| value | `string` | `null` | `undefined` |
**Returns:** `boolean`
+3 -3
View File
@@ -6,9 +6,9 @@
## hexStripPrefix
▸ **hexStripPrefix**(value: * `string` &#124; `null` &#124; `undefined`*): `string`
▸ **hexStripPrefix**(value: *`string` | `null` | `undefined`*): `string`
*Defined in [hex/stripPrefix.ts:24](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/stripPrefix.ts#L24)*
*Defined in [hex/stripPrefix.ts:24](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/stripPrefix.ts#L24)*
*__name__*: hexStripPrefix
@@ -30,7 +30,7 @@ console.log('stripped', hexStripPrefix('0x1234')); // => 1234
| Name | Type |
| ------ | ------ |
| value | `string` &#124; `null` &#124; `undefined`|
| value | `string` | `null` | `undefined` |
**Returns:** `string`
+4 -4
View File
@@ -6,9 +6,9 @@
## hexToBn
▸ **hexToBn**(value?: * `string` &#124; `number` &#124; `null`*, options?: * [ToBnOptions](../interfaces/_types_.tobnoptions.md) &#124; `boolean`*): `BN`
▸ **hexToBn**(value?: *`string` | `number` | `null`*, options?: *[ToBnOptions](../interfaces/_types_.tobnoptions.md) | `boolean`*): `BN`
*Defined in [hex/toBn.ts:36](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/toBn.ts#L36)*
*Defined in [hex/toBn.ts:36](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/toBn.ts#L36)*
*__name__*: hexToBn
@@ -30,8 +30,8 @@ hexToBn('0x123480001f'); // => BN(0x123480001f)
| Name | Type | Default value |
| ------ | ------ | ------ |
| `Optional` value | `string` &#124; `number` &#124; `null`| - |
| `Default value` options | [ToBnOptions](../interfaces/_types_.tobnoptions.md) &#124; `boolean`| { isLe: false, isNegative: false } |
| `Optional` value | `string` | `number` | `null` | - |
| `Default value` options | [ToBnOptions](../interfaces/_types_.tobnoptions.md) | `boolean` | { isLe: false, isNegative: false } |
**Returns:** `BN`
+3 -3
View File
@@ -6,9 +6,9 @@
## hexToNumber
▸ **hexToNumber**(value?: * `undefined` &#124; `string`*): `number`
▸ **hexToNumber**(value?: *`undefined` | `string`*): `number`
*Defined in [hex/toNumber.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/toNumber.ts#L22)*
*Defined in [hex/toNumber.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/toNumber.ts#L22)*
*__name__*: hexToNumber
@@ -30,7 +30,7 @@ hexToNumber('0x1234'); // => 0x1234
| Name | Type |
| ------ | ------ |
| `Optional` value | `undefined` &#124; `string`|
| `Optional` value | `undefined` | `string` |
**Returns:** `number`
+3 -3
View File
@@ -6,9 +6,9 @@
## hexToU8a
▸ **hexToU8a**(_value?: * `string` &#124; `null`*, bitLength?: *`number`*): `Uint8Array`
▸ **hexToU8a**(_value?: *`string` | `null`*, bitLength?: *`number`*): `Uint8Array`
*Defined in [hex/toU8a.ts:25](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/hex/toU8a.ts#L25)*
*Defined in [hex/toU8a.ts:25](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/hex/toU8a.ts#L25)*
*__name__*: hexToU8a
@@ -31,7 +31,7 @@ hexToU8a('0x80001f', 32); // Uint8Array([0x00, 0x80, 0x00, 0x1f])
| Name | Type | Default value |
| ------ | ------ | ------ |
| `Optional` _value | `string` &#124; `null`| - |
| `Optional` _value | `string` | `null` | - |
| `Default value` bitLength | `number` | -1 |
**Returns:** `Uint8Array`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isBn**(value: *`any`*): `boolean`
*Defined in [is/bn.ts:23](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/bn.ts#L23)*
*Defined in [is/bn.ts:23](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/bn.ts#L23)*
*__name__*: isBn
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isBoolean**(value: *`any`*): `boolean`
*Defined in [is/boolean.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/boolean.ts#L20)*
*Defined in [is/boolean.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/boolean.ts#L20)*
*__name__*: isBoolean
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isBuffer**(value: *`any`*): `boolean`
*Defined in [is/buffer.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/buffer.ts#L22)*
*Defined in [is/buffer.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/buffer.ts#L22)*
*__name__*: isBuffer
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isError**(value: *`any`*): `boolean`
*Defined in [is/error.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/error.ts#L22)*
*Defined in [is/error.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/error.ts#L22)*
*__name__*: isError
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isFunction**(value: *`any`*): `boolean`
*Defined in [is/function.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/function.ts#L20)*
*Defined in [is/function.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/function.ts#L20)*
*__name__*: isFunction
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isHex**(value: *`any`*, bitLength?: *`number`*, ignoreLength?: *`boolean`*): `boolean`
*Defined in [is/hex.ts:25](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/hex.ts#L25)*
*Defined in [is/hex.ts:25](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/hex.ts#L25)*
*__name__*: isHex
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isInstanceOf**(value: *`any`*, clazz: *`any`*): `boolean`
*Defined in [is/instanceOf.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/instanceOf.ts#L20)*
*Defined in [is/instanceOf.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/instanceOf.ts#L20)*
*__name__*: isInstanceOf
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isIp**(value: *`string`*, type?: *`IpTypes`*): `boolean`
*Defined in [is/ip.ts:27](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/ip.ts#L27)*
*Defined in [is/ip.ts:27](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/ip.ts#L27)*
*__name__*: isIp
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isNull**(value: *`any`*): `boolean`
*Defined in [is/null.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/null.ts#L20)*
*Defined in [is/null.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/null.ts#L20)*
*__name__*: isNull
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isNumber**(value: *`any`*): `boolean`
*Defined in [is/number.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/number.ts#L20)*
*Defined in [is/number.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/number.ts#L20)*
*__name__*: isNumber
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isObject**(value: *`any`*): `boolean`
*Defined in [is/object.ts:25](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/object.ts#L25)*
*Defined in [is/object.ts:25](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/object.ts#L25)*
*__name__*: isObject
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isObservable**(value: *`any`*): `boolean`
*Defined in [is/observable.ts:27](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/observable.ts#L27)*
*Defined in [is/observable.ts:27](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/observable.ts#L27)*
*__name__*: isBObservable
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isString**(value: *`any`*): `boolean`
*Defined in [is/string.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/string.ts#L20)*
*Defined in [is/string.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/string.ts#L20)*
*__name__*: isString
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isU8a**(value: *`any`*): `boolean`
*Defined in [is/u8a.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/u8a.ts#L22)*
*Defined in [is/u8a.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/u8a.ts#L22)*
*__name__*: isU8a
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **isUndefined**(value: *`any`*): `boolean`
*Defined in [is/undefined.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/is/undefined.ts#L20)*
*Defined in [is/undefined.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/is/undefined.ts#L20)*
*__name__*: isUndefined
+2 -2
View File
@@ -8,7 +8,7 @@
▸ **format**(value: *`any`*): `any`
*Defined in [logger.ts:42](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/logger.ts#L42)*
*Defined in [logger.ts:42](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/logger.ts#L42)*
**Parameters:**
@@ -25,7 +25,7 @@ ___
▸ **logger**(_type: *`string`*): [Logger](_types_.md#logger)
*Defined in [logger.ts:105](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/logger.ts#L105)*
*Defined in [logger.ts:105](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/logger.ts#L105)*
*__name__*: Logger
+3 -3
View File
@@ -6,9 +6,9 @@
## numberToHex
▸ **numberToHex**(value?: * `undefined` &#124; `number`*, bitLength?: *`number`*): `string`
▸ **numberToHex**(value?: *`undefined` | `number`*, bitLength?: *`number`*): `string`
*Defined in [number/toHex.ts:25](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/number/toHex.ts#L25)*
*Defined in [number/toHex.ts:25](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/number/toHex.ts#L25)*
*__name__*: numberToHex
@@ -31,7 +31,7 @@ numberToHex(0x1234, 32); // => 0x00001234
| Name | Type | Default value |
| ------ | ------ | ------ |
| `Optional` value | `undefined` &#124; `number`| - |
| `Optional` value | `undefined` | `number` | - |
| `Default value` bitLength | `number` | -1 |
**Returns:** `string`
+3 -3
View File
@@ -6,9 +6,9 @@
## numberToU8a
▸ **numberToU8a**(value?: * `undefined` &#124; `number`*, bitLength?: *`number`*): `Uint8Array`
▸ **numberToU8a**(value?: *`undefined` | `number`*, bitLength?: *`number`*): `Uint8Array`
*Defined in [number/toU8a.ts:23](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/number/toU8a.ts#L23)*
*Defined in [number/toU8a.ts:23](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/number/toU8a.ts#L23)*
*__name__*: numberToU8a
@@ -30,7 +30,7 @@ numberToU8a(0x1234); // => [0x12, 0x34]
| Name | Type | Default value |
| ------ | ------ | ------ |
| `Optional` value | `undefined` &#124; `number`| - |
| `Optional` value | `undefined` | `number` | - |
| `Default value` bitLength | `number` | -1 |
**Returns:** `Uint8Array`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **promisify**(self: *`any`*, fn: *`Function`*, ...params: *`Array`<`any`>*): `Promise`<`any`>
*Defined in [promisify.ts:21](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/promisify.ts#L21)*
*Defined in [promisify.ts:21](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/promisify.ts#L21)*
*__name__*: promisify
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **stringLowerFirst**(_value: *`string`*): `string`
*Defined in [string/lowerFirst.ts:23](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/string/lowerFirst.ts#L23)*
*Defined in [string/lowerFirst.ts:23](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/string/lowerFirst.ts#L23)*
*__name__*: stringLowerFirst
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **stringShorten**(_value: *`any`*, prefixLength?: *`number`*): `string`
*Defined in [string/shorten.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/string/shorten.ts#L20)*
*Defined in [string/shorten.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/string/shorten.ts#L20)*
*__name__*: stringShorten
+3 -3
View File
@@ -6,9 +6,9 @@
## stringToU8a
▸ **stringToU8a**(value?: * `undefined` &#124; `string`*): `Uint8Array`
▸ **stringToU8a**(value?: *`undefined` | `string`*): `Uint8Array`
*Defined in [string/toU8a.ts:40](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/string/toU8a.ts#L40)*
*Defined in [string/toU8a.ts:40](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/string/toU8a.ts#L40)*
*__name__*: stringToU8a
@@ -30,7 +30,7 @@ stringToU8a('hello'); // [0x68, 0x65, 0x6c, 0x6c, 0x6f]
| Name | Type |
| ------ | ------ |
| `Optional` value | `undefined` &#124; `string`|
| `Optional` value | `undefined` | `string` |
**Returns:** `Uint8Array`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **stringUpperFirst**(_value: *`string`*): `string`
*Defined in [string/upperFirst.ts:23](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/string/upperFirst.ts#L23)*
*Defined in [string/upperFirst.ts:23](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/string/upperFirst.ts#L23)*
*__name__*: stringUpperFirst
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **syncify**(promise: *`Promise`<`any`>*): `any`
*Defined in [syncify.ts:11](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/syncify.ts#L11)*
*Defined in [syncify.ts:11](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/syncify.ts#L11)*
**Parameters:**
+3 -3
View File
@@ -22,7 +22,7 @@
**Ƭ Logger**: *`object`*
*Defined in [types.ts:15](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/types.ts#L15)*
*Defined in [types.ts:15](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/types.ts#L15)*
#### Type declaration
@@ -31,9 +31,9 @@ ___
## Logger$Data
**Ƭ Logger$Data**: *`Array`< `any` &#124; `Logger$Data$Fn`>*
**Ƭ Logger$Data**: *`Array`<`any` | `Logger$Data$Fn`>*
*Defined in [types.ts:13](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/types.ts#L13)*
*Defined in [types.ts:13](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/types.ts#L13)*
___
+3 -3
View File
@@ -6,9 +6,9 @@
## u8aConcat
▸ **u8aConcat**(..._list: *`Array`< `Uint8Array` &#124; `string`>*): `Uint8Array`
▸ **u8aConcat**(..._list: *`Array`<`Uint8Array` | `string`>*): `Uint8Array`
*Defined in [u8a/concat.ts:25](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/concat.ts#L25)*
*Defined in [u8a/concat.ts:25](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/concat.ts#L25)*
*__name__*: u8aConcat
@@ -33,7 +33,7 @@ u8aConcat(
| Name | Type |
| ------ | ------ |
| `Rest` _list | `Array`< `Uint8Array` &#124; `string`> |
| `Rest` _list | `Array`<`Uint8Array` | `string`> |
**Returns:** `Uint8Array`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **u8aFixLength**(value: *`Uint8Array`*, bitLength?: *`number`*, atStart?: *`boolean`*): `Uint8Array`
*Defined in [u8a/fixLength.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/fixLength.ts#L22)*
*Defined in [u8a/fixLength.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/fixLength.ts#L22)*
*__name__*: u8aFixLength
+3 -3
View File
@@ -6,9 +6,9 @@
## u8aToBn
▸ **u8aToBn**(value: *`Uint8Array`*, options?: * [ToBnOptions](../interfaces/_types_.tobnoptions.md) &#124; `boolean`*): `BN`
▸ **u8aToBn**(value: *`Uint8Array`*, options?: *[ToBnOptions](../interfaces/_types_.tobnoptions.md) | `boolean`*): `BN`
*Defined in [u8a/toBn.ts:30](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/toBn.ts#L30)*
*Defined in [u8a/toBn.ts:30](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/toBn.ts#L30)*
*__name__*: u8aToBn
@@ -31,7 +31,7 @@ u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
| Name | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| value | `Uint8Array` | - | The value to convert |
| `Default value` options | [ToBnOptions](../interfaces/_types_.tobnoptions.md) &#124; `boolean`| { isLe: true, isNegative: false } | Options to pass while converting |
| `Default value` options | [ToBnOptions](../interfaces/_types_.tobnoptions.md) | `boolean` | { isLe: true, isNegative: false } | Options to pass while converting |
**Returns:** `BN`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **u8aToBuffer**(value?: *`Uint8Array`*): `Buffer`
*Defined in [u8a/toBuffer.ts:20](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/toBuffer.ts#L20)*
*Defined in [u8a/toBuffer.ts:20](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/toBuffer.ts#L20)*
*__name__*: u8aToBuffer
+3 -3
View File
@@ -6,9 +6,9 @@
## u8aToHex
▸ **u8aToHex**(value?: * `Uint8Array` &#124; `null`*, bitLength?: *`number`*, isPrefixed?: *`boolean`*): `string`
▸ **u8aToHex**(value?: *`Uint8Array` | `null`*, bitLength?: *`number`*, isPrefixed?: *`boolean`*): `string`
*Defined in [u8a/toHex.ts:22](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/toHex.ts#L22)*
*Defined in [u8a/toHex.ts:22](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/toHex.ts#L22)*
*__name__*: u8aToHex
@@ -30,7 +30,7 @@ u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
| Name | Type | Default value |
| ------ | ------ | ------ |
| `Optional` value | `Uint8Array` &#124; `null`| - |
| `Optional` value | `Uint8Array` | `null` | - |
| `Default value` bitLength | `number` | -1 |
| `Default value` isPrefixed | `boolean` | true |
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **u8aToString**(value?: *`Uint8Array`*): `string`
*Defined in [u8a/toString.ts:36](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/toString.ts#L36)*
*Defined in [u8a/toString.ts:36](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/toString.ts#L36)*
*__name__*: u8aToString
+3 -3
View File
@@ -6,9 +6,9 @@
## u8aToU8a
▸ **u8aToU8a**(value?: * `Array`<`number`> &#124; `Buffer` &#124; `Uint8Array` &#124; `string` &#124; `null`*): `Uint8Array`
▸ **u8aToU8a**(value?: *`Array`<`number`> | `Buffer` | `Uint8Array` | `string` | `null`*): `Uint8Array`
*Defined in [u8a/toU8a.ts:28](https://github.com/polkadot-js/common/blob/d47b865/packages/util/src/u8a/toU8a.ts#L28)*
*Defined in [u8a/toU8a.ts:28](https://github.com/polkadot-js/common/blob/89030f4/packages/util/src/u8a/toU8a.ts#L28)*
*__name__*: u8aToU8a
@@ -31,7 +31,7 @@ u8aToU8a(0x1234); // => Uint8Array([0x12, 0x34])
| Name | Type |
| ------ | ------ |
| `Optional` value | `Array`<`number`> &#124; `Buffer` &#124; `Uint8Array` &#124; `string` &#124; `null`|
| `Optional` value | `Array`<`number`> | `Buffer` | `Uint8Array` | `string` | `null` |
**Returns:** `Uint8Array`