Skip to content

Commit

Permalink
Fix linter warnings in BufferUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Nov 23, 2023
1 parent 41f522d commit 04c3019
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/BufferUtils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export function hexToBytes(hex: string) {
return new Uint8Array((hex.match(/.{2}/g) || []).map(byte => parseInt(byte, 16)));
return new Uint8Array((hex.match(/.{2}/g) || []).map((byte) => parseInt(byte, 16)));
}

export function bytesToHex(bytes: Uint8Array) {
const HEX_ALPHABET = '0123456789abcdef';

let hex = '';
for (let i = 0; i < bytes.length; i++) {
const code = bytes[i];
for (const code of bytes) {
// tslint:disable:no-bitwise
hex += HEX_ALPHABET[code >>> 4];
hex += HEX_ALPHABET[code & 0x0F];
}
Expand Down

0 comments on commit 04c3019

Please sign in to comment.