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
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { arrayFilter } from './index';
import { arrayFilter } from '.';
describe('filterArray', () => {
it('filters arrays, removing undefined', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { assert } from './index';
import { assert } from '.';
describe('assert', () => {
it('should not throw an error when test is true', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
import isFunction from '../is/function';
import { bnFromHex } from './index';
import { bnFromHex } from '.';
describe('bnFromHex', () => {
it('exists as a function', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
import BN from 'bn.js';
import { bnToBn } from './index';
import { bnToBn } from '.';
describe('bnToBn', () => {
it('converts null values to 0x00', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
import BN from 'bn.js';
import { bnToHex } from './index';
import { bnToHex } from '.';
describe('bnToHex', () => {
it('converts null values to 0x00', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
import BN from 'bn.js';
import { bnToU8a } from './index';
import { bnToU8a } from '.';
describe('bnToU8a', () => {
it('converts null values to 0x00', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { bufferToU8a } from './index';
import { bufferToU8a } from '.';
describe('bufferToU8a', () => {
it('returns an empty buffer when null provided', () => {
+1 -1
View File
@@ -3,7 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import isError from '../is/error';
import { ExtError } from './index';
import { ExtError } from '.';
describe('ExtError', () => {
describe('constructor', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexAddPrefix } from './index';
import { hexAddPrefix } from '.';
describe('hexAddPrefix', () => {
it('does not add when prefix is available', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexFixLength } from './index';
import { hexFixLength } from '.';
describe('hexFixLength', () => {
it('returns bitLength === -1 as-is', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexHasPrefix } from './index';
import { hexHasPrefix } from '.';
describe('hexHasPrefix', () => {
it('returns true when hex prefix is found', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexStripPrefix } from './index';
import { hexStripPrefix } from '.';
describe('hexStripPrefix', () => {
it('returns an empty string when null value supplied', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexToBn } from './index';
import { hexToBn } from '.';
describe('hexToBn', () => {
it('converts prefixed hex values to BN', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexToNumber } from './index';
import { hexToNumber } from '.';
describe('hexToNumber', () => {
it('converts an empty to NaN', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { hexToU8a } from './index';
import { hexToU8a } from '.';
describe('hexToU8a', () => {
it('returns an empty Uint8Array when null provided', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { assert } from './index';
import { assert } from '.';
describe('index', () => {
it('exports ok', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
import BN from 'bn.js';
import { isBn } from './index';
import { isBn } from '.';
describe('isBN', () => {
it('returns true when a BN value', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isBoolean } from './index';
import { isBoolean } from '.';
describe('isBoolean', () => {
it('returns true on false', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isBuffer } from './index';
import { isBuffer } from '.';
describe('isBuffer', () => {
it('returns true when a Buffer value', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isError } from './index';
import { isError } from '.';
describe('isError', () => {
it('returns true when an Error value', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isFunction } from './index';
import { isFunction } from '.';
describe('isFunction', () => {
it('returns true on valid functions', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isHex } from './index';
import { isHex } from '.';
describe('isHex', () => {
const test = '1234abcd';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isInstanceOf } from './index';
import { isInstanceOf } from '.';
describe('isInstanceOf', () => {
it('returns true on real instances', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isIp } from './index';
import { isIp } from '.';
describe('isIp', () => {
it('returns false when non-ip found', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isJsonObject } from './index';
import { isJsonObject } from '.';
const jsonObject = `{
"Test": "1234",
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isNull } from './index';
import { isNull } from '.';
describe('isNull', () => {
it('returns true when a null value', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isNumber } from './index';
import { isNumber } from '.';
describe('isNumber', () => {
it('returns true on valid numbers', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isObject } from './index';
import { isObject } from '.';
describe('isObject', () => {
it('returns true on valid objects', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isObservable } from './index';
import { isObservable } from '.';
describe('isObservable', () => {
it('returns true on valid observables', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isString } from './index';
import { isString } from '.';
describe('isString', () => {
it('returns true on valid strings', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isU8a } from './index';
import { isU8a } from '.';
describe('isUint8Array', () => {
it('returns false on undefined values', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { isUndefined } from './index';
import { isUndefined } from '.';
describe('isUndefined', () => {
it('returns true on undefined values', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { logger } from './index';
import { logger } from '.';
import { format } from './logger';
describe('logger', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { numberToHex } from './index';
import { numberToHex } from '.';
describe('numberToHex', () => {
it('converts undefined to 0x', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { numberToU8a } from './index';
import { numberToU8a } from '.';
describe('numberToU8a', () => {
it('converts 0 to empty', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { promisify } from './index';
import { promisify } from '.';
describe('promisify', () => {
it('handles functions with no parameters (resolve)', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { stringCamelCase } from './index';
import { stringCamelCase } from '.';
describe('stringCamelCase', () => {
it('works correctly', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { stringLowerFirst } from './index';
import { stringLowerFirst } from '.';
describe('stringLowerFirst', () => {
it("lowers the first letter if it's a capital letter", () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { stringShorten } from './index';
import { stringShorten } from '.';
describe('stringShorten', () => {
it('returns the value as-is when <= maxLength', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { stringToU8a } from '../index';
import { stringToU8a } from '..';
describe('stringToU8a', () => {
it('decodes to an empty string for undefined', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aConcat } from './index';
import { u8aConcat } from '.';
describe('u8aConcat', () => {
it('concatenates arrays', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aFixLength } from './index';
import { u8aFixLength } from '.';
describe('u8aFixLength', () => {
it('returns bitLength === -1 as-is', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aToBn } from './index';
import { u8aToBn } from '.';
describe('u8aToBn', () => {
it('converts little-endian by default', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aToBuffer } from './index';
import { u8aToBuffer } from '.';
describe('u8aToBuffer', () => {
it('returns [] when the buffer is null', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aToHex } from './index';
import { u8aToHex } from '.';
describe('u8aToHex', () => {
it('returns empty as 0x', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aToString } from '../index';
import { u8aToString } from '..';
describe('u8aToString', () => {
it('decodes to an empty string for undefined', () => {
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aToU8a } from './index';
import { u8aToU8a } from '.';
describe('u8aToU8a', () => {
it('returns an empty Uint8Array when null provided', () => {