Remove /index imports (swap to bare) (#362)
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { hexToU8a, u8aToHex } from '@polkadot/util/index';
|
||||
import { hexToU8a, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { decode, encode } from './index';
|
||||
import { decode, encode } from '.';
|
||||
|
||||
import getTests from '../test/getTests';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { DecodeFunc, DecodeOutput } from './types';
|
||||
|
||||
import { assert } from '@polkadot/util/index';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
import decodeListLong from './listLong';
|
||||
import decodeListShort from './listShort';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { assert, u8aToHex } from '@polkadot/util/index';
|
||||
import { assert, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import internalDecode from './decode';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { DecodeFunc, DecodeOutput } from './types';
|
||||
|
||||
import { assert } from '@polkadot/util/index';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
import safeParseInt from './safeParseInt';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { DecodeFunc, DecodeOutput } from './types';
|
||||
|
||||
import { assert } from '@polkadot/util/index';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
import safeParseInt from './safeParseInt';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { assert } from '@polkadot/util/index';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
export default function safeParseInt (input: Uint8Array): number {
|
||||
assert(input[0] > 0, 'invalid rlp, extra zeros found');
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { DecodeFunc, DecodeOutput } from './types';
|
||||
|
||||
import { assert } from '@polkadot/util/index';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
export default function decodeString (decode: DecodeFunc, input: Uint8Array): DecodeOutput {
|
||||
const firstByte = input[0];
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { u8aToHex } from '@polkadot/util/index';
|
||||
import { u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { encode } from './index';
|
||||
import { encode } from '.';
|
||||
|
||||
import getTests from '../test/getTests';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { EncodeFunc } from './types';
|
||||
|
||||
import { u8aConcat } from '@polkadot/util/index';
|
||||
import { u8aConcat } from '@polkadot/util';
|
||||
|
||||
import encodeLength from './length';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { hexToU8a, numberToHex } from '@polkadot/util/index';
|
||||
import { hexToU8a, numberToHex } from '@polkadot/util';
|
||||
|
||||
export default function encodeLength (length: number, offset: number): Uint8Array {
|
||||
if (length < 56) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { assert, bnToU8a, bufferToU8a, hexHasPrefix, hexToU8a, isBn, isBuffer, isNull, isNumber, isString, isU8a, isUndefined, numberToU8a, stringToU8a } from '@polkadot/util/index';
|
||||
import { assert, bnToU8a, bufferToU8a, hexHasPrefix, hexToU8a, isBn, isBuffer, isNull, isNumber, isString, isU8a, isUndefined, numberToU8a, stringToU8a } from '@polkadot/util';
|
||||
|
||||
type Encoder = {
|
||||
check: (value: any) => boolean,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { EncodeFunc } from './types';
|
||||
|
||||
import { u8aConcat } from '@polkadot/util/index';
|
||||
import { u8aConcat } from '@polkadot/util';
|
||||
|
||||
import encodeLength from './length';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// of the MPL-2.0 license. See the LICENSE file for details.
|
||||
|
||||
/**
|
||||
* @summary Utility methods to encode and decode [Ethereum RLP](https://github.com/ethereum/wiki/wiki/RLP). Adapted from the [EthereumJS implementation](https://github.com/ethereumjs/rlp/blob/0ce09db81fc303fcee593f7cc094ba44015f9b92/index.js)
|
||||
* @summary Utility methods to encode and decode [Ethereum RLP](https://github.com/ethereum/wiki/wiki/RLP). Adapted from the [EthereumJS implementation](https://github.com/ethereumjs/rlp/blob/0ce09db81fc303fcee593f7cc094ba44015f9b92.js)
|
||||
*/
|
||||
|
||||
export { default as decode } from './decode';
|
||||
|
||||
Reference in New Issue
Block a user