We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.fill
1 parent 7d0b447 commit d2146cbCopy full SHA for d2146cb
ts_src/index.ts
@@ -7,10 +7,7 @@
7
function base (ALPHABET: string): base.BaseConverter {
8
if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')
9
10
- const BASE_MAP = new Uint8Array(256)
11
- for (let j = 0; j < BASE_MAP.length; j++) {
12
- BASE_MAP[j] = 255
13
- }
+ const BASE_MAP = new Uint8Array(256).fill(255);
14
15
for (let i = 0; i < ALPHABET.length; i++) {
16
const x = ALPHABET.charAt(i)
0 commit comments