Remove /index imports (swap to bare) (#362)

This commit is contained in:
Jaco Greeff
2019-03-14 08:41:00 +01:00
committed by GitHub
parent a7ef2dcd86
commit de67a88f45
162 changed files with 198 additions and 189 deletions
+2 -2
View File
@@ -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';
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -4,7 +4,7 @@
import { DecodeFunc, DecodeOutput } from './types';
import { assert } from '@polkadot/util/index';
import { assert } from '@polkadot/util';
import safeParseInt from './safeParseInt';
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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 -2
View File
@@ -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';
+1 -1
View File
@@ -4,7 +4,7 @@
import { EncodeFunc } from './types';
import { u8aConcat } from '@polkadot/util/index';
import { u8aConcat } from '@polkadot/util';
import encodeLength from './length';
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -4,7 +4,7 @@
import { EncodeFunc } from './types';
import { u8aConcat } from '@polkadot/util/index';
import { u8aConcat } from '@polkadot/util';
import encodeLength from './length';
+1 -1
View File
@@ -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';