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

@billdaddy/fmtable

v0.1.0

Published

Zero-dependency ASCII/Unicode table formatter — plain, grid, rounded, pipe/Markdown, and minimal styles, per-column alignment, auto-width.

Readme

fmtable

npm version npm downloads CI License: MIT

Zero-dependency ASCII/Unicode table formatter for Node.js, Deno, and browsers.

Inspired by Python's tabulate and Go's tablewriter — now in pure TypeScript with no runtime dependencies.

╭────┬────────────────────┬────────────╮
│ ID │ Name               │ Downloads  │
├────┼────────────────────┼────────────┤
│  1 │ fmtable            │  1,200,000 │
│  2 │ cli-table3         │    900,000 │
│  3 │ tabulate (Python)  │  3,000,000 │
╰────┴────────────────────┴────────────╯

Features

  • 6 border stylesplain, simple, grid, rounded, pipe (GitHub Markdown), minimal
  • Per-column alignmentleft, right, center
  • Auto-width calculation — fits content, respects minWidths / maxWidths
  • ANSI-aware — strips escape codes before measuring width
  • CJK-aware — correct double-width character handling
  • Row separators — optional separator between every data row
  • Cell truncation — truncates overflowed cells with
  • CLI included — pipe JSON arrays straight from the shell

Install

npm install @billdaddy/fmtable

Usage

import { fmtable } from "@billdaddy/fmtable";

const table = fmtable(
  [
    [1, "Alice",  "Engineering"],
    [2, "Bob",    "Design"],
    [3, "Carol",  "Marketing"],
  ],
  {
    headers: ["ID", "Name", "Department"],
    style:   "rounded",              // default
    align:   ["right", "left", "left"],
    padding: 1,                      // default
  },
);

console.log(table);

Output:

╭────┬───────┬─────────────╮
│ ID │ Name  │ Department  │
├────┼───────┼─────────────┤
│  1 │ Alice │ Engineering │
│  2 │ Bob   │ Design      │
│  3 │ Carol │ Marketing   │
╰────┴───────┴─────────────╯

Styles

| Name | Example | |------|---------| | plain | whitespace-separated, no borders | | simple | dashes as top/bottom/header separators | | grid | +--+--+ box-drawing | | rounded | ╭──╮ Unicode rounded corners (default) | | pipe | \| --- \| GitHub Markdown tables | | minimal | column separators only |

fmtable(rows, { style: "grid" });
// +---+-------+
// | 1 | Alice |
// +---+-------+
// | 2 | Bob   |
// +---+-------+

fmtable(rows, { style: "pipe", headers: ["ID", "Name"] });
// | ID | Name  |
// |----|-------|
// | 1  | Alice |
// | 2  | Bob   |

API

fmtable(rows, options?)

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | rows | CellValue[][] | — | 2-D array of rows | | options.headers | string[] | — | Column header labels | | options.style | StyleName | "rounded" | Border style | | options.align | Align \| Align[] | "left" | Per-column or global alignment | | options.padding | number | 1 | Spaces on each side of content | | options.minWidths | number[] | [] | Minimum column widths | | options.maxWidths | number[] | [] | Maximum column widths (truncates with ) | | options.rowSeparators | boolean | false | Add separator between every row |

CellValue is string | number | boolean | null | undefined.
Align is "left" | "right" | "center".
StyleName is "plain" | "simple" | "grid" | "rounded" | "pipe" | "minimal".

CLI

# Pipe a JSON array of row arrays
echo '[[1,"Alice","Engineering"],[2,"Bob","Design"]]' \
  | fmtable --headers ID,Name,Department --style grid

# Or from a file
cat data.json | fmtable --style pipe --align right,left,left

Options: --style, --headers, --align, --padding, --row-sep, --help.

vs. alternatives

| Package | Zero-dep | TypeScript | Styles | CJK | ANSI | CLI | |---------|----------|------------|--------|-----|------|-----| | fmtable | ✅ | ✅ | 6 | ✅ | ✅ | ✅ | | cli-table3 | ❌ | partial | 3 | ❌ | ✅ | ❌ | | table | ❌ | ✅ | 1 | ❌ | ✅ | ❌ | | text-table | ✅ | ❌ | 1 | ❌ | ❌ | ❌ | | columnify | ✅ | ❌ | 1 | ❌ | ❌ | ❌ |

Contributors ✨

Contributions of any kind are welcome! See the contributing guide and add yourself via @all-contributors please add @<username> for <contributions>.

License

MIT © trananhtung