@@ -26,7 +26,7 @@ function str2packed(
2626 utfType : EncodingType ,
2727 existingPacked : number [ ] | undefined ,
2828 existingPackedLen : number | undefined ,
29- bigEndianMod : - 1 | 1
29+ bigEndianMod : - 1 | 1 ,
3030) : packedValue {
3131 let codePnt ,
3232 codePntArr ,
@@ -62,7 +62,7 @@ function str2packed(
6262 0xf0 | ( codePnt >>> 18 ) ,
6363 0x80 | ( ( codePnt >>> 12 ) & 0x3f ) ,
6464 0x80 | ( ( codePnt >>> 6 ) & 0x3f ) ,
65- 0x80 | ( codePnt & 0x3f )
65+ 0x80 | ( codePnt & 0x3f ) ,
6666 ) ;
6767 }
6868
@@ -116,7 +116,7 @@ function hex2packed(
116116 str : string ,
117117 existingPacked : number [ ] | undefined ,
118118 existingPackedLen : number | undefined ,
119- bigEndianMod : - 1 | 1
119+ bigEndianMod : - 1 | 1 ,
120120) : packedValue {
121121 let i , num , intOffset , byteOffset ;
122122
@@ -159,7 +159,7 @@ function bytes2packed(
159159 str : string ,
160160 existingPacked : number [ ] | undefined ,
161161 existingPackedLen : number | undefined ,
162- bigEndianMod : - 1 | 1
162+ bigEndianMod : - 1 | 1 ,
163163) : packedValue {
164164 let codePnt , i , intOffset , byteOffset ;
165165
@@ -195,7 +195,7 @@ function b642packed(
195195 str : string ,
196196 existingPacked : number [ ] | undefined ,
197197 existingPackedLen : number | undefined ,
198- bigEndianMod : - 1 | 1
198+ bigEndianMod : - 1 | 1 ,
199199) : packedValue {
200200 let byteCnt = 0 ,
201201 index ,
@@ -258,7 +258,7 @@ function uint8array2packed(
258258 arr : Uint8Array ,
259259 existingPacked : number [ ] | undefined ,
260260 existingPackedLen : number | undefined ,
261- bigEndianMod : - 1 | 1
261+ bigEndianMod : - 1 | 1 ,
262262) : packedValue {
263263 let i , intOffset , byteOffset ;
264264
@@ -292,7 +292,7 @@ function arraybuffer2packed(
292292 arr : ArrayBuffer ,
293293 existingPacked : number [ ] | undefined ,
294294 existingPackedLen : number | undefined ,
295- bigEndianMod : - 1 | 1
295+ bigEndianMod : - 1 | 1 ,
296296) : packedValue {
297297 return uint8array2packed ( new Uint8Array ( arr ) , existingPacked , existingPackedLen , bigEndianMod ) ;
298298}
@@ -308,7 +308,7 @@ function arraybuffer2packed(
308308export function getStrConverter (
309309 format : FormatType ,
310310 utfType : EncodingType ,
311- bigEndianMod : - 1 | 1
311+ bigEndianMod : - 1 | 1 ,
312312 /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
313313) : ( input : any , existingBin ?: number [ ] , existingBinLen ?: number ) => packedValue {
314314 /* Validate encoding */
@@ -369,7 +369,7 @@ export function getStrConverter(
369369 case "ARRAYBUFFER" :
370370 try {
371371 new ArrayBuffer ( 0 ) ;
372- } catch ( ignore ) {
372+ } catch {
373373 throw new Error ( arraybuffer_error ) ;
374374 }
375375 /**
@@ -384,7 +384,7 @@ export function getStrConverter(
384384 case "UINT8ARRAY" :
385385 try {
386386 new Uint8Array ( 0 ) ;
387- } catch ( ignore ) {
387+ } catch {
388388 throw new Error ( uint8array_error ) ;
389389 }
390390 /**
@@ -417,7 +417,7 @@ export function packed2hex(
417417 packed : number [ ] ,
418418 outputLength : number ,
419419 bigEndianMod : - 1 | 1 ,
420- formatOpts : { outputUpper : boolean ; b64Pad : string }
420+ formatOpts : { outputUpper : boolean ; b64Pad : string } ,
421421) : string {
422422 const hex_tab = "0123456789abcdef" ;
423423 let str = "" ,
@@ -449,7 +449,7 @@ export function packed2b64(
449449 packed : number [ ] ,
450450 outputLength : number ,
451451 bigEndianMod : - 1 | 1 ,
452- formatOpts : { outputUpper : boolean ; b64Pad : string }
452+ formatOpts : { outputUpper : boolean ; b64Pad : string } ,
453453) : string {
454454 let str = "" ,
455455 i ,
@@ -560,19 +560,19 @@ export function getOutputConverter(
560560 format : "HEX" | "B64" | "BYTES" ,
561561 outputBinLen : number ,
562562 bigEndianMod : - 1 | 1 ,
563- outputOptions : { outputUpper : boolean ; b64Pad : string }
563+ outputOptions : { outputUpper : boolean ; b64Pad : string } ,
564564) : ( binarray : number [ ] ) => string ;
565565export function getOutputConverter (
566566 format : "ARRAYBUFFER" ,
567567 outputBinLen : number ,
568568 bigEndianMod : - 1 | 1 ,
569- outputOptions : { outputUpper : boolean ; b64Pad : string }
569+ outputOptions : { outputUpper : boolean ; b64Pad : string } ,
570570) : ( binarray : number [ ] ) => ArrayBuffer ;
571571export function getOutputConverter (
572572 format : "UINT8ARRAY" ,
573573 outputBinLen : number ,
574574 bigEndianMod : - 1 | 1 ,
575- outputOptions : { outputUpper : boolean ; b64Pad : string }
575+ outputOptions : { outputUpper : boolean ; b64Pad : string } ,
576576) : ( binarray : number [ ] ) => Uint8Array ;
577577/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
578578export function getOutputConverter ( format : any , outputBinLen : any , bigEndianMod : any , outputOptions : any ) : any {
@@ -593,7 +593,7 @@ export function getOutputConverter(format: any, outputBinLen: any, bigEndianMod:
593593 try {
594594 /* Need to test ArrayBuffer support */
595595 new ArrayBuffer ( 0 ) ;
596- } catch ( ignore ) {
596+ } catch {
597597 throw new Error ( arraybuffer_error ) ;
598598 }
599599 return function ( binarray : number [ ] ) : ArrayBuffer {
@@ -603,7 +603,7 @@ export function getOutputConverter(format: any, outputBinLen: any, bigEndianMod:
603603 try {
604604 /* Need to test Uint8Array support */
605605 new Uint8Array ( 0 ) ;
606- } catch ( ignore ) {
606+ } catch {
607607 throw new Error ( uint8array_error ) ;
608608 }
609609 return function ( binarray : number [ ] ) : Uint8Array {
0 commit comments