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

@pipelex/tools-wasm

v0.2.0

Published

MTHDS lint & format compiled to WASM — fully offline (embedded schema), same engine and Diagnostic wire shape as pipelex-tools-py and the Pipelex API.

Downloads

226

Readme

@pipelex/tools-wasm

MTHDS lint & format compiled to WebAssembly — a lean, fully offline binding over the shared Rust engine that also powers the plxt CLI, the pipelex-tools-py Python library, and the Pipelex API's /v1/lint + /v1/format. All bindings emit the identical Diagnostic wire shape by construction.

  • Offline by design: lint validates against the MTHDS JSON Schema embedded at build time — no HTTP, no filesystem, no config discovery. The schema therefore freezes at package build time; server-side validate remains the authoritative verdict on skew.
  • Lean: unlike @pipelex/lsp (which carries the whole language server), this package exposes only lintMthds and formatMthds, small enough to vendor inside a plugin hook bundle.

Usage

The package ships a single UMD bundle (like its @taplo/lib / @pipelex/lsp siblings), so pick the import form for your environment:

// Bundlers (esbuild, rollup, webpack, vite) — the primary use-case of
// vendoring into a plugin hook bundle — resolve named imports from UMD:
import { initialize, lintMthds, formatMthds } from "@pipelex/tools-wasm";

// Native Node ESM cannot see named exports through the minified UMD wrapper;
// default-import and destructure instead:
import pkg from "@pipelex/tools-wasm";
const { initialize, lintMthds, formatMthds } = pkg;

// CommonJS:
const { initialize, lintMthds, formatMthds } = require("@pipelex/tools-wasm");
// Once, at startup (loads the WASM module).
await initialize();

// Lint: syntax → semantic → schema, short-circuiting at the first failing stage.
const { diagnostics } = lintMthds(mthdsSource);
// diagnostics: [{ kind, severity, message, location, range }, ...] — empty == clean

// Format with the canonical MTHDS defaults; never throws on malformed MTHDS
// (the input comes back unchanged with the blocking diagnostics).
const { formatted, changed, diagnostics: formatDiagnostics } = formatMthds(mthdsSource);

// Formatter overrides use the same snake_case keys as `plxt fmt -o key=value`
// and the API's /v1/format options passthrough.
formatMthds(mthdsSource, { column_width: 100, align_entries: false });

The Diagnostic shape mirrors @pipelex/sdk's Diagnostic/DiagnosticRange/DiagnosticKind: location and range are null (never absent) when the analysis cannot attribute a span.

Development

Built from crates/pipelex-tools-wasm via rollup + @wasm-tool/rollup-plugin-rust, with the WASM inlined into a single UMD bundle.

yarn build   # debug build (RELEASE=true yarn build for the release artifact)
yarn test    # vitest over the built bundle + the repo's MTHDS fixture corpus