chore: use singleton loader to prevent duplicated wasm request

This commit is contained in:
鲁树人 committed 2023-05-10 23:16:12 +01:00
1 parent fc2238ff39
commit 24a68fcf59
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
import { LibParakeetInit, BlobSink, createArrayBufferReader } from '@jixun/libparakeet';
import { loadLibParakeet, BlobSink, createArrayBufferReader } from '@jixun/libparakeet';
function testWasm() {
LibParakeetInit().then(async (mod) => {
loadLibParakeet().then(async (mod) => {
const data = new Uint8Array(0x2000);
for (let i = 0; i < data.byteLength; i++) {
data[i] = i & 0xff;