Install the package:
npm install orgize
yarn add orgize
Load the wasm module and init:
import { init, renderHtml } from "orgize";
init().then(() => {
console.log(renderHtml("* Hello, /world/!"));
});
const { init, renderHtml } = require("orgize");
const { readFileSync } = require("fs");
const bytes = readFileSync(require.resolve("orgize/lib/orgize_bg.wasm"));
const wasmModule = new WebAssembly.Module(bytes);
init(wasmModule).then(() => {
console.log(renderHtml("* Hello, /world/!"));
});
MIT