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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.1
    1
  • 2.0.0
    8
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i pikchr-wasm

Weekly Downloads

9

Version

2.0.1

License

none

Unpacked Size

587 kB

Total Files

19

Last publish

Collaborators

  • fabiospampinato