npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

formualizer

v0.1.0

Published

WebAssembly bindings for Formualizer Excel formula parser

Downloads

6

Readme

Formualizer (WASM)

An open‑source, embeddable spreadsheet engine — in your browser and Node. Formualizer parses, evaluates, and mutates Excel‑style workbooks at speed, with a modern Rust core, Arrow‑powered storage, and a clean JS API.

Installation

npm install formualizer

Usage

JavaScript/TypeScript

import init, { tokenize, parse, Workbook } from 'formualizer';

// Initialize the WASM module once
await init();

// Tokenize a formula
const tokenizer = await tokenize("=SUM(A1:B2)");
console.log(tokenizer.tokens);
console.log(tokenizer.render());

// Parse a formula into an AST
const ast = await parse("=A1+B2*2");
console.log(ast);

// Engine-backed workbook usage
const wb = new Workbook();
wb.addSheet("Data");
wb.setValue("Data", 1, 1, 10);
wb.setValue("Data", 1, 2, 20);
wb.setFormula("Data", 1, 3, "=A1+B1");
console.log(await wb.evaluateCell("Data", 1, 3)); // 30

// Sheet facade
const sheet = wb.sheet("Sheet2");
await sheet.setValue(1, 1, 5);
await sheet.setFormula(1, 2, "=A1*3");
console.log(await sheet.evaluateCell(1, 2)); // 15

Node / Bundlers

import init, { Workbook } from 'formualizer';

await init();

// Workbook + changelog/undo/redo
const wb = new Workbook();
wb.addSheet("S");
await wb.setChangelogEnabled(true);

await wb.beginAction("seed");
await wb.setValue("S", 1, 1, 10);
await wb.endAction();

await wb.beginAction("edit");
await wb.setValue("S", 1, 1, 20);
await wb.endAction();

await wb.undo(); // value back to 10
await wb.redo(); // value back to 20

API

tokenize(formula: string): Promise<Tokenizer>

Tokenizes an Excel formula string into tokens.

parse(formula: string): Promise<ASTNodeData>

Parses an Excel formula string into an Abstract Syntax Tree.

Tokenizer

  • tokens: Get all tokens as an array
  • render(): Reconstruct the original formula from tokens
  • length: Number of tokens
  • getToken(index): Get a specific token by index

Parser

  • parse(): Parse the formula and return an AST

ASTNode

  • toJSON(): Convert the AST node to JSON
  • toString(): Get a string representation
  • getType(): Get the node type

Reference

Represents a cell or range reference in Excel notation.

Workbook

  • constructor()
  • addSheet(name: string): void
  • sheetNames(): string[]
  • sheet(name: string): Sheet — idempotently creates and returns a sheet facade
  • setValue(sheet: string, row: number, col: number, value: any): void
  • setFormula(sheet: string, row: number, col: number, formula: string): void
  • evaluateCell(sheet: string, row: number, col: number): any
  • setChangelogEnabled(enabled: boolean): void
  • beginAction(description: string): void
  • endAction(): void
  • undo(): void
  • redo(): void

Sheet

  • setValue(row: number, col: number, value: any): void
  • getValue(row: number, col: number): any
  • setFormula(row: number, col: number, formula: string): void
  • getFormula(row: number, col: number): string | undefined
  • setValues(startRow: number, startCol: number, data: any[][]): void
  • setFormulas(startRow: number, startCol: number, data: string[][]): void
  • evaluateCell(row: number, col: number): any

Building from Source

# Install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

# Build the WASM module (bundler target for npm)
wasm-pack build --target bundler --out-dir pkg --release

Testing

# Run Rust tests
cargo test -p formualizer-wasm

# Run WASM tests
wasm-pack test --node

License

MIT OR Apache-2.0


Why Formualizer

  • Speed: Arrow‑powered columnar storage, vectorized kernels, and a modern dependency graph enable fast recalculation at scale.
  • Ergonomics: Engine‑backed Workbook and Sheet surfaces mirror spreadsheet operations and support batch edits with undo/redo.
  • Compatibility: Aims for Excel parity across core built‑ins; conformance suite (OpenFormula/Excel) is in progress.

Benchmarks and parity dashboards are coming soon.