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

@bota-apps/export

v0.1.1

Published

Framework-free client-side data export: turn header + row arrays into a downloaded CSV, XLSX, or PDF. One subpath per format (./csv is dependency-free; ./excel pulls xlsx, ./pdf pulls jspdf) plus an exportTable() format dispatcher on the barrel.

Readme

@bota-apps/export

Framework-free, client-side data export. Turn a headers array plus an array of plain row objects into a file the browser downloads — CSV, XLSX, or PDF. No React, no server round-trip: each helper builds the file in the browser and triggers the download.

Row keys drive column order (taken from the first row); headers supplies the display labels, positionally aligned to those keys.

Install

pnpm add @bota-apps/export

Dependencies are per subpath, so you only pay for the format you import:

  • @bota-apps/export/csv — dependency-free.
  • @bota-apps/export/excel — pulls in xlsx.
  • @bota-apps/export/pdf — pulls in jspdf and jspdf-autotable.

Importing the barrel (@bota-apps/export) reaches all three, so prefer a single format's subpath when the format is fixed at build time.

Usage

Every helper takes a filename (no extension — the format's extension is appended) followed by the headers labels and the rows. A row is an ExportRowRecord<string, string | number | boolean | null | undefined>.

CSV — the lean, dependency-free path:

import { exportToCsv } from "@bota-apps/export/csv";

exportToCsv("projects", ["Name", "Department"], [{ name: "Jane Doe", department: "Engineering" }]);
// downloads projects.csv

Excel — the same shape, one column per row key on a sheet named Report:

import { exportToExcel } from "@bota-apps/export/excel";

exportToExcel("projects", ["Name", "Department"], rows);
// downloads projects.xlsx

PDF — takes an extra title argument, rendered above an auto-laid-out table:

import { exportToPdf } from "@bota-apps/export/pdf";

exportToPdf("projects", "Project Roster", ["Name", "Department"], rows);
// downloads projects.pdf

When the format is chosen at runtime, use the exportTable dispatcher on the barrel. It forwards to the matching helper (and title is used by the PDF format only):

import { exportTable, type ExportFormat } from "@bota-apps/export";

const format: ExportFormat = "pdf"; // "csv" | "excel" | "pdf"
exportTable(format, "project-summary", "Project Summary", headers, rows);

Subpaths

Each format is its own entry so you only bundle the dependency you use:

| Import | Exports | Deps pulled | | ---------------------------- | ------------------------------------------------------------------ | -------------------------- | | @bota-apps/export/csv | exportToCsv | none | | @bota-apps/export/excel | exportToExcel | xlsx | | @bota-apps/export/pdf | exportToPdf | jspdf, jspdf-autotable | | @bota-apps/export (barrel) | exportTable, ExportFormat, ExportRow, plus all three helpers | all of the above |

Part of the @bota-apps packages monorepo.