File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ const b64re =
3232const _fromCC = String . fromCharCode . bind ( String ) ;
3333const _U8Afrom = typeof Uint8Array . from === 'function'
3434 ? Uint8Array . from . bind ( Uint8Array )
35- : ( it , fn : ( any ) => number = ( x ) => x ) =>
36- new Uint8Array ( Array . prototype . slice . call ( it , 0 ) . map ( fn ) ) ;
35+ : ( it ) => new Uint8Array ( Array . prototype . slice . call ( it , 0 ) ) ;
3736const _mkUriSafe = ( src : string ) => src
3837 . replace ( / = / g, '' ) . replace ( / [ + \/ ] / g, ( m0 ) => m0 == '+' ? '-' : '_' ) ;
3938const _tidyB64 = ( s : string ) => s . replace ( / [ ^ A - Z a - z 0 - 9 \+ \/ ] / g, '' ) ;
@@ -195,7 +194,7 @@ const _atob = _hasatob ? (asc: string) => atob(_tidyB64(asc))
195194//
196195const _toUint8Array = _hasBuffer
197196 ? ( a : string ) => _U8Afrom ( Buffer . from ( a , 'base64' ) )
198- : ( a : string ) => _U8Afrom ( _atob ( a ) , c => c . charCodeAt ( 0 ) ) ;
197+ : ( a : string ) => _U8Afrom ( _atob ( a ) . split ( '' ) . map ( c => c . charCodeAt ( 0 ) ) ) ;
199198/**
200199 * converts a Base64 string to a Uint8Array.
201200 */
You can’t perform that action at this time.
0 commit comments