orgize/wasm/README.md

628 B

orgize

npm

Quick start

Install the package:

npm install orgize
yarn add orgize

Load the wasm module and init:

Browser

import { init, renderHtml } from "orgize";

init().then(() => {
  console.log(renderHtml("* Hello, /world/!"));
});

Node.js

const { init, renderHtml } = require("orgize");
const { readFile } = require("fs/promises");

readFile(require.resolve("orgize/lib/orgize_bg.wasm"))
  .then((bytes) => init(new WebAssembly.Module(bytes)))
  .then(() => {
    console.log(renderHtml("* Hello, /world/!"));
  });

License

MIT