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

kochedacliutils

v1.0.0

Published

Provides some simple helper/utility functions for command line applications

Readme

Kocheda CLI Utils

This library provides some simple command line interface utilities.

Example Usage

npm install kochedacliutils

Then in code

const cliutils = require("kochedacliutils");

console.log(cliutils.COLOURS.blue + "This is blue" + cliutils.COlOURS.clear);

Console Colours

An object called 'COLOURS' provides the following console escape codes to generate colour:

COLOURS.black
COLOURS.red
COLOURS.green
COLOURS.yellow
COLOURS.blue
COLOURS.magenta
COLOURS.cyan
COLOURS.white
COLOURS.boldblack
COLOURS.boldred
COLOURS.boldgreen
COLOURS.boldyellow
COLOURS.boldblue
COLOURS.boldmagenta
COLOURS.boldcyan
COLOURS.boldwhite
COLOURS.clear

Table Generation

The arrayToTable() function converts 2 dimensional arrays into a formatted string which will display as an aligned table in the console along with optional lines. The function provides the following:

  • All cells in table are aligned/padded
  • Configurable cell padding
  • Optional lines
  • Missing cell data in rows is automatically added
  • Non-string cell content is stringified

Examples

The simplest example is just a 2 dimensional array of content:

console.log(module.exports.arrayToTable([["Cell 1", "Cell 2", "Cell 3"], ["Example", "This is longer content", 12345],, ["JSON content", "Stringified", {"hello":"world"}]]));

 Cell 1        Cell 2                  Cell 3            
 Example       This is longer content  12345             
 JSON content  Stringified             {"hello":"world"} 

And the same data with lines and additional padding:

console.log(module.exports.arrayToTable([["Cell 1", "Cell 2", "Cell 3"], ["Example", "This is longer content", 12345],, ["JSON content", "Stringified", {"hello":"world"}]], {lines:true, padding:4}));

┌────────────────────┬──────────────────────────────┬─────────────────────────┐
│    Cell 1          │    Cell 2                    │    Cell 3               │
├────────────────────┼──────────────────────────────┼─────────────────────────┤
│    Example         │    This is longer content    │    12345                │
├────────────────────┼──────────────────────────────┼─────────────────────────┤
│    JSON content    │    Stringified               │    {"hello":"world"}    │
└────────────────────┴──────────────────────────────┴─────────────────────────┘