summaryrefslogtreecommitdiff
path: root/node_modules/blake3-wasm/esm/node/wasm.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/blake3-wasm/esm/node/wasm.js')
-rw-r--r--node_modules/blake3-wasm/esm/node/wasm.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/blake3-wasm/esm/node/wasm.js b/node_modules/blake3-wasm/esm/node/wasm.js
new file mode 100644
index 0000000..026a374
--- /dev/null
+++ b/node_modules/blake3-wasm/esm/node/wasm.js
@@ -0,0 +1,12 @@
+let w;
+/**
+ * Lazyily get the WebAssembly module. Used to avoid unnecessarily importing
+ * the wasm when extending the WebAssembly node code for native bindings.
+ */
+export const getWasm = () => {
+ if (!w) {
+ w = require('../../dist/wasm/nodejs/blake3_js');
+ }
+ return w;
+};
+//# sourceMappingURL=wasm.js.map \ No newline at end of file