mirror of
https://github.com/JonasunderscoreJones/api.jonasjones.dev.git
synced 2025-10-23 12:09:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
commit
58a42872a0
1745 changed files with 741893 additions and 0 deletions
20
node_modules/blake3-wasm/browser-async.js
generated
vendored
Normal file
20
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