aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/ts/truncate.worker.ts
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-09-28 08:42:25 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-09-28 08:42:25 -0500
commitef30f835d04038a1cbec06fbe35a70037e926cd6 (patch)
tree6cb29359fc05d6d96361c786886a8d442f3dbfc2 /app/src/lib/ts/truncate.worker.ts
parentGet rid of crc32, truncate instead (diff)
downloadtrinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.gz
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.bz2
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.lz
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.xz
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.zst
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.zip
Lint
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r--app/src/lib/ts/truncate.worker.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/src/lib/ts/truncate.worker.ts b/app/src/lib/ts/truncate.worker.ts
index 52eebb7..ad00011 100644
--- a/app/src/lib/ts/truncate.worker.ts
+++ b/app/src/lib/ts/truncate.worker.ts
@@ -1,10 +1,9 @@
import type { TruncateRequest, TruncateResponse } from '../types/truncate-worker';
-
onmessage = async (message: MessageEvent<TruncateRequest>) => {
- const file = message.data.file;
- const buffer = await file.arrayBuffer();
- const truncated = buffer.slice(0, message.data.size);
+ const file = message.data.file;
+ const buffer = await file.arrayBuffer();
+ const truncated = buffer.slice(0, message.data.size);
- postMessage({ file: truncated } as TruncateResponse);
-} \ No newline at end of file
+ postMessage({ file: truncated } as TruncateResponse);
+};