wasm.js 602 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. let wasm;
  4. /**
  5. * Gets the webassembly module provided in provideWasm.
  6. */
  7. exports.getWasm = () => {
  8. if (!wasm) {
  9. throw new Error('BLAKE3 webassembly not loaded. Please import the module via `blake3/browser` or `blake3/browser-async`');
  10. }
  11. return wasm;
  12. };
  13. /**
  14. * Sets the webassembly module used for the browser build. This indirection is
  15. * needed to provide compatibility between the "browser" and "browser-async" modes.
  16. */
  17. exports.provideWasm = (w) => {
  18. wasm = w;
  19. };
  20. //# sourceMappingURL=wasm.js.map