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

@donothing/boxxy

v1.0.1

Published

A JavaScript box drawing library for ASCII art layouts with CSV table converter

Downloads

9

Readme

Boxxy - JavaScript Box Drawing Library

A JavaScript library for creating ASCII art layouts and tables, translated from OCaml. Perfect for creating formatted console output, tables, and text-based user interfaces. Includes a CLI tool for converting CSV data to ASCII tables.

Features

  • Box Creation: Create boxes from strings, characters, or filled with patterns
  • Layout Management: Stack boxes horizontally and vertically with alignment options
  • Table Generation: Convert data arrays into formatted ASCII tables
  • CSV CLI Tool: Pipe CSV data directly to create ASCII tables
  • Framing: Add borders and frames around content
  • Flexible Alignment: Support for left, center, and right alignment

Quick Start

import { printBox, framed, fromString, makeTableFromCsv } from './index.js';

// Create a simple framed box
const box = framed(fromString("Hello, World!"));
printBox(box);

// Create a table from CSV data
const csvData = [
  ['Name', 'Age', 'City'],
  ['Alice', '30', 'New York'],
  ['Bob', '25', 'Chicago']
];
const table = makeTableFromCsv(csvData);
printBox(table);

CLI Usage

Convert CSV data to ASCII tables by piping to the boxxy command:

# From a CSV file
cat data.csv | npx boxxy

# From inline data
echo 'Name,Age,City
Alice,30,New York
Bob,25,Los Angeles' | npx boxxy

# With tab-separated values
cat data.tsv | npx boxxy

# Get help
npx boxxy --help

# Get version
npx boxxy --version

CLI Options

  • -h, --help - Show help message and usage examples
  • -v, --version - Display version information

Testing

# Test CSV converter
npm run test-csv

API Reference

Core Functions

  • fromString(s) - Create a box from a string
  • fill(char, height, width) - Create a filled box
  • beside(left, right, align?) - Stack boxes horizontally
  • above(top, bottom, align?) - Stack boxes vertically
  • framed(box) - Add a frame around a box
  • makeTableFromCsv(csvData) - Create a table from CSV data array
  • makeTableFromCsv(csvData) - Create a table from CSV data (array of arrays)

Alignment Options

  • HorizontalAlign.LEFT, HorizontalAlign.CENTER, HorizontalAlign.RIGHT
  • VerticalAlign.TOP, VerticalAlign.CENTER, VerticalAlign.BOTTOM

Example Output

$ echo 'Product,Price,Rating
Laptop,999.99,4.5
Coffee Mug,12.50,4.8' | npx boxxy

.------------------------------.
| Product    | Price  | Rating |
|------------|--------|--------|
| Laptop     | 999.99 |  4.5   |
| Coffee Mug | 12.50  |  4.8   |
'------------------------------'

License

MIT