(string)
| 9 | } |
| 10 | |
| 11 | const uint8ArrayFromHexString = (string) => { |
| 12 | if (!string.length) { |
| 13 | return new Uint8Array(0) |
| 14 | } |
| 15 | |
| 16 | if (string.length % 2 !== 0) { |
| 17 | throw new Error('Invalid hex string') |
| 18 | } |
| 19 | |
| 20 | return new Uint8Array(string.match(/.{1,2}/g).map(byte => parseInt(byte, 16))) |
| 21 | } |
| 22 | |
| 23 | const bases = Object.keys(alphabets).reduce(function (bases, alphabetName) { |
| 24 | bases[alphabetName] = basex(alphabets[alphabetName]) |
no outgoing calls
no test coverage detected
searching dependent graphs…