index.js 899 B

12345678910111213141516171819
  1. "use strict";
  2. function __export(m) {
  3. for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  4. }
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. // Bunlers add the `process.browser` flag to indicate the build enviroment.
  7. // Throw a verbose error if we see people bundling the Node.js build in their
  8. // browser, since it probably won't work for them (or at least not give them)
  9. // nice tree shaking and such.
  10. //
  11. // Note that we don't check the presence of window/document, since those can
  12. // be emulated in common test scenarios (e.g. jest's default setup with jsdom).
  13. if (process.browser) {
  14. throw new Error('You tried to import the Node.js version of blake3, instead of the browser ' +
  15. 'version, in your build. You can fix this by importing "blake3/browser" ' +
  16. 'instead of "blake3"');
  17. }
  18. __export(require("./node"));
  19. //# sourceMappingURL=index.js.map