File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,8 @@ function isBytes(a: unknown): a is Uint8Array {
1414 return a instanceof Uint8Array || ( ArrayBuffer . isView ( a ) && a . constructor . name === 'Uint8Array' ) ;
1515}
1616/** Asserts something is Uint8Array. */
17- function abytes ( b : Uint8Array | undefined , ... lengths : number [ ] ) : void {
17+ function abytes ( b : Uint8Array | undefined ) : void {
1818 if ( ! isBytes ( b ) ) throw new Error ( 'Uint8Array expected' ) ;
19- if ( lengths . length > 0 && ! lengths . includes ( b . length ) )
20- throw new Error ( 'Uint8Array expected of length ' + lengths + ', got length=' + b . length ) ;
2119}
2220
2321function isArrayOf ( isString : boolean , arr : any [ ] ) {
@@ -30,8 +28,6 @@ function isArrayOf(isString: boolean, arr: any[]) {
3028 }
3129}
3230
33- // no abytes: seems to have 10% slowdown. Why?!
34-
3531function afn ( input : Function ) : input is Function {
3632 if ( typeof input !== 'function' ) throw new Error ( 'function expected' ) ;
3733 return true ;
You can’t perform that action at this time.
0 commit comments