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

turbo-xlsx

v0.1.4

Published

Fast native structured-workbook-model to formatted XLSX for Node — no headless office, accountant-grade number formats, streaming.

Readme

turbo-xlsx

Fast native structured-workbook-model → formatted XLSX for Node — a Rust core exposed via napi-rs. Accountant-grade number formats (currency per locale, thousands separators, negative-in-red/parens), styled headers, bold totals, grouped/outlined columns, merges, freeze panes, and a streaming writer for huge sheets. Country-agnostic (locale + ISO-4217 code are inputs) and deterministic. The turbo-xlsx-parse build adds an .xlsx reader.

Status

v0.1.4. Prebuilt .node addons ship for linux x64 gnu/musl, linux arm64, darwin arm64, win32 x64 msvc.

Install

npm install turbo-xlsx          # lean writer
npm install turbo-xlsx-parse    # writer + XLSX reader (adds parse())

Two variants (like turbo-html2pdf's with/without fonts): the base turbo-xlsx is write-only; turbo-xlsx-parse is the same plus an .xlsx reader. The parse() function exists only in the -parse build.

Quick start

import { write } from "turbo-xlsx";

const xlsx = write({
  locale: "es-MX",
  sheets: [{
    name: "Resumen",
    freeze: { rows: 1 },
    rows: [
      { cells: [{ type: "string", value: "Depto", style: { font: { bold: true } } }, { type: "string", value: "Bruto" }] },
      { cells: [{ type: "string", value: "Ingeniería" }, { type: "currency", value: 1234567, currency: { code: "MXN", locale: "es-MX", negative: "red-parens" } }] },
      { isTotal: true, cells: [{ type: "string", value: "Total" }, { type: "currency", value: 9876543, currency: { code: "MXN" } }] },
    ],
  }],
}, { meta: { title: "Reporte" } });
// `xlsx` is a Buffer (the .xlsx); currency values are integer minor units (cents).

API

  • write(workbook, opts?) → Buffer — one-shot, declarative object.
  • writeFromJson(stringOrObject, opts?) → Buffer — JSON in, validated fail-closed.
  • writeRows({ sheetName?, columns, rows }, opts?) → Buffer — single-sheet fast-path.
  • createWriter(opts?) → WorkbookWriterstartSheet/writeRow/endSheet/finish() for huge sheets.
  • createWorkbook(opts?) → WorkbookBuilder — imperative CRUD (addSheet, addRows, updateCell, merge, freeze, setTotalsRow) → build().
  • parse(data, opts?) → stringturbo-xlsx-parse build only. Read an .xlsx (incl. DEFLATE-compressed) into JSON (values grid or { typed: true } model), { format: "csv" }, or { format: "md" }. ~1.85× faster than calamine, cell-for-cell verified against SheetJS / ExcelJS / openpyxl.

Password protection: pass { password } to any write call to encrypt the output with ECMA-376 Agile Encryption (AES-256) — write(workbook, { password: "s3cret" }). Excel / LibreOffice open it with that password.

Embedded images: give a sheet images: [{ data, format, anchor, alt? }]data is base64 image bytes, format is "png" | "jpeg" | "gif", and anchor is either { kind: "twoCell", from, to } (resizes with the cell range) or { kind: "oneCell", at, width, height } (fixed pixel size). The builder exposes sheet.addImage(image). With turbo-xlsx-parse, parse() returns each sheet's images back, so a write → parse round-trip preserves them.

Returned Buffers carry the run's non-fatal .diagnostics; the streaming finish() returns { xlsx, diagnostics }. Fatal faults throw a typed TurboXlsxError with a stable .code. Full types in index.d.ts; the JSON workbook schema in schema/turbo-xlsx.workbook.schema.json.

License

MIT