mirror of
https://github.com/JonasunderscoreJones/aka-worker.git
synced 2025-10-23 09:59:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
parent
8cb86120f1
commit
fff961078a
1777 changed files with 1011798 additions and 0 deletions
20
cool-dawn-3d3b/node_modules/blake3-wasm/browser-async.js
generated
vendored
Normal file
20
cool-dawn-3d3b/node_modules/blake3-wasm/browser-async.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { provideWasm } from './esm/browser/wasm.js';
|
||||
import * as wasm from './dist/wasm/web/blake3_js.js';
|
||||
import * as blake3 from './esm/browser/index.js';
|
||||
|
||||
let cached;
|
||||
|
||||
/**
|
||||
* Manually loads the WebAssembly module, returning a promise that resolves
|
||||
* to the BLAKE3 implementation once available.
|
||||
*/
|
||||
export default function load(module) {
|
||||
if (!cached) {
|
||||
cached = wasm.default(module).then(() => {
|
||||
provideWasm(wasm);
|
||||
return blake3;
|
||||
});
|
||||
}
|
||||
|
||||
return cached;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue