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

consolecute

v1.0.7

Published

A simple package that includes all constants for console text decoration.

Downloads

4

Readme

Console Cute

This is primarily a list of values that can be used to print prettier text to your console. It includes color constants like RED, GREEN and YELLOW and background color constants like BG_BLUE, BG_CYAN, and BG_WHITE. It also contains other text decoration constants for your console like ITALIC, BOLD and UNDERLINE. It has three functions, an RGB and BG_RGB function that creates strings for specific RGB values and a PRINT function that trims and allows you to apply styles to text you are printing to the console.

Usage

You can use the colors directly with a console.log function by appending the string values like this:

import {RED, BLUE, BG_WHITE, RESET } from 'consolecute';

console.log(`${RED}This will print RED text.${RESET}`);
console.log(`${BLUE}${BG_WHITE}Blue text on a white background.${RESET});

PRINT function

The PRINT function makes it fairly simple to color text and automatically reset it.

import { PRINT, RED, RESET } from 'consolecute';

PRINT('This will print in RED', RED);

It will also remove all the leading space from multi-line text for when you log from a function.

if( true ) {
    PRINT(`
    ================================================
    The leading space on the left will be removed.
    ================================================
    `);
}

Options

Here are a list of the colors and other options you can import:

Text color strings:

BLACK
RED
GREEN
YELLOW
BLUE
MAGENTA
CYAN
WHITE
RGB(r, g, b)
DEFAULT

Background color strings:

BG_BLACK
BG_RED
BG_GREEN
BG_YELLOW
BG_BLUE
BG_MAGENTA
BG_CYAN
BG_WHITE
BG_RGB(r, g, b)
BG_DEFAULT

Control strings:

RESET
BOLD
DIM
ITALIC
UNDERLINE
BLINK
REVERSE
HIDDEN
STRIKETHROUGH
DBL_UNDERLINE
DBL_BLINK

From Rick

This library is pretty simple. I just wanted a list of all the controls strings exported in an index.js file for working on CardTable.com. If you need some help, I'm on Twitter/X @battagline