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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ansikit

v1.5.0

Published

🎨 The ultimate terminal ANSI kit.

Downloads

118

Readme

AnsiKit simply prints escapes to the terminal for the user, but also results in cleaner looking code.
Note: If a terminal is not xterm-compatible some functions may not work as intended or just won't work at all.
(For example the standard Windows cmd, but Windows Terminal should have better results.)

Table of Contents

Install

npm install ansikit

Example

const ansikit = require('ansikit');

// The format function takes color tags and replaces it with color codes.
const text = ansikit.format('{underline}Hello {red}world!');
console.log(text);

Styles

A style can be used in a format function like: {style} for example {bold}.

Modifiers

reset
bold
bold-off
dim or faint
italic
underline
underline-off
invert or reverse
strike or strikethrough

Colors

black
red
green
yellow
blue
magenta
cyan
white

black-bg
red-bg
green-bg
yellow-bg
blue-bg
magenta-bg
cyan-bg
white-bg

bright-black or grey or gray
bright-red
bright-green
bright-yellow
bright-blue
bright-magenta
bright-cyan

Links

  • Documentation: https://luvella.github.io/AnsiKit

Contributing

If you would like to contribute, be sure to:

  • Lint with our ESLint config
  • Add JSDoc (if adding a new function)

And make a pull request!

Developing

git clone https://github.com/Luvella/AnsiKit
cd AnsiKit
npm i
npm i eslint -g # For linting (if you don't have it installed)
# After making changes:
eslint lib/

If you aren't contributing code you can always open an issue.

License

AnsiKit is licensed under the MIT license.
Read here for more info.