summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/iso/isoUint8Array.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-16 16:47:09 -0700
committerMatthew Miller <matthew@millerti.me>2023-08-16 16:47:09 -0700
commit070f73b8de107111b4a34001254a981548f677f7 (patch)
tree786494543aaae1494cfa229b17df5d0265c7e3d1 /packages/server/src/helpers/iso/isoUint8Array.ts
parent70e65cbf4e8966adcc8ac31099a03872fe2ce5f8 (diff)
Run `ddi fmt` over src/
Diffstat (limited to 'packages/server/src/helpers/iso/isoUint8Array.ts')
-rw-r--r--packages/server/src/helpers/iso/isoUint8Array.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/server/src/helpers/iso/isoUint8Array.ts b/packages/server/src/helpers/iso/isoUint8Array.ts
index 7dc163e..bc5f51f 100644
--- a/packages/server/src/helpers/iso/isoUint8Array.ts
+++ b/packages/server/src/helpers/iso/isoUint8Array.ts
@@ -15,7 +15,7 @@ export function areEqual(array1: Uint8Array, array2: Uint8Array): boolean {
* A replacement for `Buffer.toString('hex')`
*/
export function toHex(array: Uint8Array): string {
- const hexParts = Array.from(array, i => i.toString(16).padStart(2, '0'));
+ const hexParts = Array.from(array, (i) => i.toString(16).padStart(2, '0'));
// adce000235bcc60a648b0b25f1f05503
return hexParts.join('');
@@ -39,7 +39,7 @@ export function fromHex(hex: string): Uint8Array {
const byteStrings = hex.match(/.{1,2}/g) ?? [];
- return Uint8Array.from(byteStrings.map(byte => parseInt(byte, 16)));
+ return Uint8Array.from(byteStrings.map((byte) => parseInt(byte, 16)));
}
/**
@@ -51,7 +51,7 @@ export function concat(arrays: Uint8Array[]): Uint8Array {
const toReturn = new Uint8Array(totalLength);
- arrays.forEach(arr => {
+ arrays.forEach((arr) => {
toReturn.set(arr, pointer);
pointer += arr.length;
});
@@ -79,7 +79,7 @@ export function fromUTF8String(utf8String: string): Uint8Array {
* Convert an ASCII string to Uint8Array
*/
export function fromASCIIString(value: string): Uint8Array {
- return Uint8Array.from(value.split('').map(x => x.charCodeAt(0)));
+ return Uint8Array.from(value.split('').map((x) => x.charCodeAt(0)));
}
/**