Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ansi-colors

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-colors - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

types/index.d.ts

104

index.js

@@ -23,4 +23,4 @@ /*!

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -41,4 +41,4 @@ * @name bgblack

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -59,4 +59,4 @@ * @name bgblue

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -77,4 +77,4 @@ * @name bgcyan

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -95,4 +95,4 @@ * @name bggreen

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -113,4 +113,4 @@ * @name bgmagenta

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -131,4 +131,4 @@ * @name bgred

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -149,4 +149,4 @@ * @name bgwhite

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -167,4 +167,4 @@ * @name bgyellow

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -185,4 +185,4 @@ * @name black

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -203,4 +203,4 @@ * @name blue

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -221,4 +221,4 @@ * @name bold

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -239,4 +239,4 @@ * @name cyan

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -257,4 +257,4 @@ * @name dim

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -275,4 +275,4 @@ * @name gray

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -293,4 +293,4 @@ * @name green

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -311,4 +311,4 @@ * @name grey

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -329,4 +329,4 @@ * @name hidden

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -347,4 +347,4 @@ * @name inverse

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -365,4 +365,4 @@ * @name italic

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -383,4 +383,4 @@ * @name magenta

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -401,4 +401,4 @@ * @name red

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -419,4 +419,4 @@ * @name reset

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -437,4 +437,4 @@ * @name strikethrough

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -455,4 +455,4 @@ * @name underline

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -473,4 +473,4 @@ * @name white

*
* @param {String} `str` String to wrap with ansi codes.
* @return {String} Wrapped string
* @param {string} message String to wrap with ansi codes.
* @return {string} Wrapped string
* @api public

@@ -477,0 +477,0 @@ * @name yellow

{
"name": "ansi-colors",
"description": "Collection of ansi colors and styles.",
"version": "1.0.1",
"version": "1.1.0",
"homepage": "https://github.com/doowb/ansi-colors",

@@ -17,5 +17,7 @@ "author": "Brian Woodward (https://github.com/doowb)",

"files": [
"index.js"
"index.js",
"types/index.d.ts"
],
"main": "index.js",
"types": "./types/index.d.ts",
"engines": {

@@ -25,3 +27,3 @@ "node": ">=0.10.0"

"scripts": {
"test": "mocha"
"test": "mocha && tsc --project types"
},

@@ -33,3 +35,4 @@ "dependencies": {

"gulp-format-md": "^1.0.0",
"mocha": "*"
"mocha": "^3.5.3",
"typescript": "^2.7.1"
},

@@ -36,0 +39,0 @@ "keywords": [

@@ -13,12 +13,19 @@ # ansi-colors [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/ansi-colors.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/ansi-colors)

## Why was this module created?
## Usage
This module was created to make it easy to allow color configuration through options. This module inlines the code from [these other ansi-* modules](#related-projects) for faster load times. The lazy loading of the [underlying modules](#related-projects) modules has been moved to [ansi-colors-lazy](https://github.com/doowb/ansi-colors-lazy).
This module exports an object of functions. Each function wraps a string with the ansi codes used to display the string with that color (or style). Use the wrapped string with `console.log`:
## Usage
```js
var colors = require('ansi-colors');
console.log(colors.bold(colors.cyan('[info]')), colors.cyan('This is some information'));
console.log(colors.bold(colors.yellow('[warning]')), colors.yellow('This is a warning'));
console.error(colors.bold(colors.red('[ERROR]')), colors.red('Danger! There was an error!'));
```
![image](https://user-images.githubusercontent.com/995160/34897845-3150daae-f7be-11e7-9706-38c42461e0ee.png)
## Example
See the [example](./example.js) for more colors and styles.
## About

@@ -64,4 +71,4 @@

| --- | --- |
| 5 | [doowb](https://github.com/doowb) |
| 3 | [jonschlinkert](https://github.com/jonschlinkert) |
| 10 | [doowb](https://github.com/doowb) |
| 3 | [jonschlinkert](https://github.com/jonschlinkert) |

@@ -95,3 +102,3 @@ ### Building docs

Copyright © 2017, [Brian Woodward](https://github.com/doowb).
Copyright © 2018, [Brian Woodward](https://github.com/doowb).
Released under the [MIT License](LICENSE).

@@ -101,2 +108,2 @@

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 06, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 12, 2018._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc