md4c.js 545 B

123456789101112131415161718
  1. 'use strict';
  2. // Loaded instead of ./wasm/md4c (see next.config.js). Real Emscripten bundle via alias.
  3. const factory = require('md4c-emscripten-real');
  4. let createMd4cModule;
  5. if (typeof factory === 'function') {
  6. createMd4cModule = factory;
  7. } else if (factory && typeof factory.default === 'function') {
  8. createMd4cModule = factory.default;
  9. } else {
  10. throw new Error(
  11. '[neo/md4c shim] Emscripten factory missing — got ' + typeof factory
  12. );
  13. }
  14. module.exports = createMd4cModule;
  15. module.exports.default = createMd4cModule;