File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ var _Buffer = require('safe-buffer').Buffer
99function base ( ALPHABET ) {
1010 if ( ALPHABET . length >= 255 ) { throw new TypeError ( 'Alphabet too long' ) }
1111 var BASE_MAP = new Uint8Array ( 256 )
12- BASE_MAP . fill ( 255 )
12+ for ( var j = 0 ; j < BASE_MAP . length ; j ++ ) {
13+ BASE_MAP [ j ] = 255
14+ }
1315 for ( var i = 0 ; i < ALPHABET . length ; i ++ ) {
1416 var x = ALPHABET . charAt ( i )
1517 var xc = x . charCodeAt ( 0 )
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ function base (ALPHABET: string): base.BaseConverter {
1111 if ( ALPHABET . length >= 255 ) throw new TypeError ( 'Alphabet too long' )
1212
1313 const BASE_MAP = new Uint8Array ( 256 )
14- BASE_MAP . fill ( 255 )
14+ for ( let j = 0 ; j < BASE_MAP . length ; j ++ ) {
15+ BASE_MAP [ j ] = 255
16+ }
1517
1618 for ( let i = 0 ; i < ALPHABET . length ; i ++ ) {
1719 const x = ALPHABET . charAt ( i )
You can’t perform that action at this time.
0 commit comments