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

array-table-kit

v0.2.3

Published

Convert arrays of objects into clean Markdown and HTML tables.

Readme

array-table-kit

CI

Convert arrays of objects into clean Markdown and HTML tables.

array-table-kit is a small TypeScript utility for reports, README generation, admin exports, docs tooling and static sites. It has no runtime dependencies and works without a frontend framework.

Demo: packages.wasta-wocket.fr/array-table-kit/

Package quality

  • TypeScript types are generated from the source.
  • ESM-only package with no runtime dependencies.
  • Marked as side-effect free for bundlers.
  • Tested on Node.js 20 and 22 with GitHub Actions.
  • Works in Node.js, docs tooling and static site pipelines.

Install

npm install array-table-kit

Markdown

import { arrayToMarkdownTable } from 'array-table-kit';

const rows = [
  { name: 'Ada', role: 'Engineer', stats: { score: 98 } },
  { name: 'Grace', role: 'Admiral', stats: { score: 94 } }
];

console.log(arrayToMarkdownTable(rows));
| name  | role     | stats.score |
| ----- | -------- | ----------- |
| Ada   | Engineer | 98          |
| Grace | Admiral  | 94          |

HTML

import { arrayToHtmlTable } from 'array-table-kit';

const html = arrayToHtmlTable(rows, {
  tableClassName: 'data-table',
  caption: 'Team'
});

String values are escaped before rendering HTML.

Ecosystem recipes

array-table-kit is useful after parsing or extracting rows from other data sources.

Convert terminal output to Markdown:

import { arrayToMarkdownTable } from 'array-table-kit';
import { parseTerminalTable } from 'terminal-table-kit';

const rows = parseTerminalTable(kubectlOutput, {
  keyStyle: 'camel'
});

const markdown = arrayToMarkdownTable(rows);

Use object-path-kit when user-provided paths need bracket notation or validation:

import { getPath } from 'object-path-kit';

const cityPath = 'customer["billing.address"].city';

arrayToMarkdownTable(rows, {
  columns: [
    {
      key: 'city',
      header: 'City',
      accessor: (row) => getPath(row, cityPath, '') as string
    }
  ]
});

Use object-key-paths to discover fields from an unknown object and then render a quick path inventory:

import { arrayToMarkdownTable } from 'array-table-kit';
import { getPathEntries } from 'object-key-paths';

const markdown = arrayToMarkdownTable(getPathEntries(payload), {
  columns: [
    { key: 'path', header: 'Path' },
    { key: 'depth', header: 'Depth', align: 'right' },
    { key: 'isLeaf', header: 'Leaf' }
  ]
});

Use json-csv-kit when the same rows need a downloadable CSV export:

import { arrayToMarkdownTable } from 'array-table-kit';
import { jsonToCsv } from 'json-csv-kit';

const markdown = arrayToMarkdownTable(rows);
const csv = jsonToCsv(rows);

Columns

arrayToMarkdownTable(rows, {
  columns: [
    { key: 'name', header: 'Name' },
    { key: 'stats.score', header: 'Score', align: 'right' }
  ]
});

Use path when you want a stable column id that differs from the source field:

arrayToMarkdownTable(rows, {
  columns: [
    { key: 'score', path: 'stats.score', header: 'Score', align: 'right' }
  ]
});

Computed columns can use accessor:

arrayToMarkdownTable(rows, {
  columns: [
    { key: 'name' },
    {
      key: 'summary',
      header: 'Summary',
      accessor: (row) => `${row.name} scored ${row.stats.score}`
    }
  ]
});

Primitive arrays are supported and render as a value column:

arrayToMarkdownTable(['one', 'two']);

Readonly arrays and as const data are accepted by the TypeScript API, which keeps fixtures and generated data easy to pass directly.

Options

| Option | Default | Description | | ------ | ------- | ----------- | | columns | auto-discovered | Explicit column keys or column definitions. | | emptyValue | '' | Text for null, undefined and invalid dates. | | flatten | true | Flatten nested objects into dot-path columns. | | formatHeader | none | Format auto-discovered column labels. | | formatValue | none | Format every cell value before rendering. | | maxDepth | 6 | Maximum depth for object flattening. | | sortColumns | false | Sort auto-discovered columns alphabetically. |

CLI

array-table-kit data.json
array-table-kit data.json --html
array-table-kit data.json --format=html

The CLI expects a top-level JSON array. Primitive array items are wrapped in a value column.

Why

array-to-table is useful but old and focused on simple Markdown output. array-table-kit keeps the tiny utility spirit while adding TypeScript types, HTML output, safer escaping, nested object flattening, explicit columns and a small CLI.

License

MPL-2.0