{"_rev":"4-08a2ec6ed2e2488c62958d94c768a8b1","time":{"created":"2025-10-14T03:33:57.533Z","modified":"2025-10-14T03:33:58.451Z","3.7.0-1":"2025-10-13T09:05:53.642Z","3.7.0-1.beta":"2025-10-14T03:33:58.142Z"},"_id":"@dhys/wasm-pandoc","name":"@dhys/wasm-pandoc","dist-tags":{"latest":"3.7.0-1.beta"},"versions":{"3.7.0-1.beta":{"name":"@dhys/wasm-pandoc","version":"3.7.0-1.beta","description":"Pandoc transpiled as WASM to be used in browsers.","publishConfig":{"access":"public"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/ningpengtao-coder/wasm-pandoc.git"},"homepage":"https://github.com/ningpengtao-coder/wasm-pandoc","bugs":{"url":"https://github.com/ningpengtao-coder/wasm-pandoc/issues"},"keywords":["pandoc","wasm"],"author":{"name":"ningpegntao"},"license":"MIT","dependencies":{"@bjorn3/browser_wasi_shim":"^0.4.1"},"_id":"@dhys/wasm-pandoc@3.7.0-1.beta","gitHead":"18f72dd2c0ee19fe6657452243ab3c87d37e392b","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-bctbHK3HWF383Mqc08gVl1h5bhbzKZ8EdXnSMUWD/VX01PgmQlsMjw6hRvznve0vwSIW8phdD0A4Fg3WsJ6WQA==","shasum":"d3f3ec2a809adf1e19b50c629a09a8182ddc8e3e","tarball":"https://registry.npmjs.org/@dhys/wasm-pandoc/-/wasm-pandoc-3.7.0-1.beta.tgz","fileCount":5,"unpackedSize":56546158,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCGLBpFa+SJBL6bFqUc4jgVw1prDI5fdHUcXT+cDT9U4gIhAILIUDt1XGOmM06Qre9O3737S5d5QTQCXbDJ4t2R/EL7"}]},"_npmUser":{"name":"ningpengtao","email":"npt1317054578@gmail.com"},"directories":{},"maintainers":[{"name":"ningpengtao","email":"npt1317054578@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wasm-pandoc_3.7.0-1.beta_1760412837598_0.19932831242019522"},"_hasShrinkwrap":false}},"maintainers":[{"name":"ningpengtao","email":"npt1317054578@gmail.com"}],"description":"Pandoc transpiled as WASM to be used in browsers.","homepage":"https://github.com/ningpengtao-coder/wasm-pandoc","keywords":["pandoc","wasm"],"repository":{"type":"git","url":"git+https://github.com/ningpengtao-coder/wasm-pandoc.git"},"author":{"name":"ningpegntao"},"bugs":{"url":"https://github.com/ningpengtao-coder/wasm-pandoc/issues"},"license":"MIT","readme":"# `wasm-pandoc`\n\n**Looking for maintainer:** Johannes Wilm has temporarily taken over maintainership of this package due to there being no package on NPM.\nHowever, he knows very little about wasm and haskell and would like for someone else to take this package again.\n\n\nThe latest version of `pandoc` CLI compiled as a standalone `wasm32-wasi` module that can be run by browsers.\n\n## [Live demo](https://fiduswriter.github.io/wasm-pandoc)\n\nStdin on the left, stdout on the right, command line arguments at the\nbottom. No convert button, output is produced dynamically as input\nchanges.\n\n\n## To use\n\n1. Make `wasm-pandoc` a dependency in your project.json.\n\n2. In your bundler mark \"wasm\" as an asset/resource. For example in rspack, in your config file:\n\n```js\nmodule.exports = {\n    ...\n    module: {\n        ...\n        rules: [\n            ...\n            {\n                test: /\\.(wasm)$/,\n                type: \"asset/resource\"\n            }\n            ...\n        ]\n        ...\n    }\n    ...\n}\n```\n\n3. Import `pandoc` from `wasm-pandoc` like this:\n\n```js\nimport { pandoc } from \"wasm-pandoc\"\n```\n\n4. Execute it like this (it's async):\n\n```js\nconst output = await pandoc(\n    '-s -f json -t markdown', // command line switches\n    inputFileContents, // string for text formats or blob for binary formats\n    [ // Additional files - for example bibliography or images\n        {\n            filename: 'image13.png',\n            contents: ..., // string for text formats or blob for binary formats\n        },\n        ...\n    ]\n)\n\nconsole.log(output)\n\n{\n  out: '...',\n  mediaFiles: Map {'media': Map {'image1.jpg' => Blob, 'image2.png' => Blob, ...}}\n}\n\n```\n\n`out` will either be a string (for text formats) or a Blob for binary formats of the main output. `mediaFiles` will be a map of all additional dirs/files that pandoc has created during the process.\n\n\n\n## Acknowledgements\n\nThanks to John MacFarlane and all the contributors who made `pandoc`\npossible: a fantastic tool that has benefited many developers and is a\nsource of pride for the Haskell community!\n\nThanks to all efforts to make `pandoc` run with wasm, including but not limited to:\n\n- amesgen [`Don't patch out network`](https://github.com/haskell-wasm/pandoc/pull/1)\n- Cheng Shao [`pandoc-wasm`](https://github.com/tweag/pandoc-wasm)\n- George Stagg's [`pandoc-wasm`](https://github.com/georgestagg/pandoc-wasm)\n- Yuto Takahashi's [`wasm-pandoc`](https://github.com/y-taka-23/wasm-pandoc)\n- TerrorJack's asterius pandoc [demo](https://asterius.netlify.app/demo/pandoc/pandoc.html)\n","readmeFilename":"README.md"}