diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba367396..9a3a549b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - run: npm install - run: npm run test diff --git a/src/helpers.ts b/src/helpers.ts index e1403366..5f48ae39 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -5,8 +5,8 @@ import * as ethjsUtil from 'ethjs-util' * @param {string} input string to check hex prefix of */ export const assertIsHexString = function(input: string): void { - const msg = `This method only supports 0x-prefixed hex strings but input was: ${input}` if (!ethjsUtil.isHexString(input)) { + const msg = `This method only supports 0x-prefixed hex strings but input was: ${input}` throw new Error(msg) } } @@ -16,8 +16,8 @@ export const assertIsHexString = function(input: string): void { * @param {Buffer} input value to check */ export const assertIsBuffer = function(input: Buffer): void { - const msg = `This method only supports Buffer but input was: ${input}` if (!Buffer.isBuffer(input)) { + const msg = `This method only supports Buffer but input was: ${input}` throw new Error(msg) } } @@ -27,8 +27,8 @@ export const assertIsBuffer = function(input: Buffer): void { * @param {number[]} input value to check */ export const assertIsArray = function(input: number[]): void { - const msg = `This method only supports number arrays but input was: ${input}` if (!Array.isArray(input)) { + const msg = `This method only supports number arrays but input was: ${input}` throw new Error(msg) } } @@ -38,8 +38,8 @@ export const assertIsArray = function(input: number[]): void { * @param {string} input value to check */ export const assertIsString = function(input: string): void { - const msg = `This method only supports strings but input was: ${input}` if (typeof input !== 'string') { + const msg = `This method only supports strings but input was: ${input}` throw new Error(msg) } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: