* 7.7.1

* Extract stringify replacer

* formatting

* linting

* isUnSorted{A, B}

* Adjust

* Complexity?

* Cleanups

* Update packages/util-crypto/src/address/derive.ts

* formatBalance

* Revert formatBalance
This commit is contained in:
Jaco
2021-10-31 16:44:17 +02:00
committed by GitHub
parent 481f7f6ee0
commit 8880e8fa8c
32 changed files with 264 additions and 178 deletions
+4 -6
View File
@@ -9,13 +9,11 @@ import { BASE32_ALPHABET, BITS_PER_CHAR } from './bs32';
import { base32Validate } from './validate';
// Build the character lookup table:
const LOOKUP = BASE32_ALPHABET
.split('')
.reduce((lookup: Record<string, number>, char: string, index: number): Record<string, number> => {
lookup[char] = index;
const LOOKUP = BASE32_ALPHABET.split('').reduce<Record<string, number>>((lookup, a, i) => {
lookup[a] = i;
return lookup;
}, {});
return lookup;
}, {});
/** @internal */
function decode (output: Uint8Array, input: string, offset: number): [Uint8Array, number, number] {