Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Nov 9, 2024
1 parent 03221c8 commit 51f90f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/_assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ function bool(b: boolean) {

// copied from utils
export function isBytes(a: unknown): a is Uint8Array {
return (
a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array')
);
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
}

function bytes(b: Uint8Array | undefined, ...lengths: number[]) {
Expand Down
4 changes: 1 addition & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { bytes as abytes } from './_assert.js';
// export { isBytes } from './_assert.js';
// We can't reuse isBytes from _assert, because somehow this causes huge perf issues
export function isBytes(a: unknown): a is Uint8Array {
return (
a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array')
);
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
}

// prettier-ignore
Expand Down

0 comments on commit 51f90f5

Please sign in to comment.