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

ansi-colors-lazy

v1.0.0

Published

Lazyily loaded collection of ansi colors and styles.

Downloads

12

Readme

ansi-colors-lazy NPM version NPM monthly downloads NPM total downloads Linux Build Status Windows Build Status

Lazyily loaded collection of ansi colors and styles.

Install

Install with npm:

$ npm install --save ansi-colors-lazy

Why was this module created?

This module was created to make it easy to allow color configuration through options. If your application will always use specific colors, we recommend requiring those modules directly. If your application requires using most of the colors, we recommend using ansi-colors for faster require times (the colors are inlined). When using only a few colors at a time or allowing users to choose from a few colors, this module will be more efficient due to lazy caching the underlying modules.

Usage

var colors = require('ansi-colors-lazy');

API

bgblack

Wrap a string with ansi codes to create a black background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgblack('some string'));

bgblue

Wrap a string with ansi codes to create a blue background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgblue('some string'));

bgcyan

Wrap a string with ansi codes to create a cyan background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgcyan('some string'));

bggreen

Wrap a string with ansi codes to create a green background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bggreen('some string'));

bgmagenta

Wrap a string with ansi codes to create a magenta background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgmagenta('some string'));

bgred

Wrap a string with ansi codes to create a red background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgred('some string'));

bgwhite

Wrap a string with ansi codes to create a white background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgwhite('some string'));

bgyellow

Wrap a string with ansi codes to create a yellow background.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bgyellow('some string'));

black

Wrap a string with ansi codes to create black text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.black('some string'));

blue

Wrap a string with ansi codes to create blue text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.blue('some string'));

bold

Wrap a string with ansi codes to create bold text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.bold('some string'));

cyan

Wrap a string with ansi codes to create cyan text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.cyan('some string'));

dim

Wrap a string with ansi codes to create dim text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.dim('some string'));

gray

Wrap a string with ansi codes to create gray text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.gray('some string'));

green

Wrap a string with ansi codes to create green text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.green('some string'));

grey

Wrap a string with ansi codes to create grey text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.grey('some string'));

hidden

Wrap a string with ansi codes to create hidden text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.hidden('some string'));

inverse

Wrap a string with ansi codes to create inverse text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.inverse('some string'));

italic

Wrap a string with ansi codes to create italic text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.italic('some string'));

magenta

Wrap a string with ansi codes to create magenta text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.magenta('some string'));

red

Wrap a string with ansi codes to create red text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.red('some string'));

reset

Wrap a string with ansi codes to reset ansi colors currently on the string.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.reset('some string'));

strikethrough

Wrap a string with ansi codes to add a strikethrough to the text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.strikethrough('some string'));

underline

Wrap a string with ansi codes to underline the text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.underline('some string'));

white

Wrap a string with ansi codes to create white text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.white('some string'));

yellow

Wrap a string with ansi codes to create yellow text.

Params

  • str {String}: String to wrap with ansi codes.
  • returns {String}: Wrapped string

Example

console.log(colors.yellow('some string'));

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Release history

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Brian Woodward

License

Copyright © 2017, Brian Woodward. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on December 06, 2017.