pikchr-wasm
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Pikchr WASM

A fast and small port of Pikchr to WASM.

Install

npm install --save pikchr-wasm

Usage

import pikchr from 'pikchr-wasm'; // Default entrypoint, optimized for speed, ~76kb min+gzip
// import pikchr from 'pikchr-wasm/speed'; // Default entrypoint, optimized for speed, ~76kb min+gzip
// import pikchr from 'pikchr-wasm/size'; // Alternative entrypoint, optimized for bundle size, ~65kb min+gzip

await pikchr.loadWASM (); // First of all you need to load the WASM instance and wait for it

const markup = 'box'; // The markup to render
const svg = pikchr.render ( markup ); // You get an SVG as a string back

Licenses

Package Sidebar

Install

npm i pikchr-wasm

Weekly Downloads

20

Version

2.0.1

License

none

Unpacked Size

587 kB

Total Files

19

Last publish

Collaborators

  • fabiospampinato