ansi-styles
Advanced tools
Comparing version 3.2.0 to 3.2.1
23
index.js
@@ -105,2 +105,3 @@ 'use strict'; | ||
const ansi2ansi = n => n; | ||
const rgb2rgb = (r, g, b) => [r, g, b]; | ||
@@ -111,4 +112,8 @@ | ||
styles.color.ansi = {}; | ||
styles.color.ansi256 = {}; | ||
styles.color.ansi = { | ||
ansi: wrapAnsi16(ansi2ansi, 0) | ||
}; | ||
styles.color.ansi256 = { | ||
ansi256: wrapAnsi256(ansi2ansi, 0) | ||
}; | ||
styles.color.ansi16m = { | ||
@@ -118,4 +123,8 @@ rgb: wrapAnsi16m(rgb2rgb, 0) | ||
styles.bgColor.ansi = {}; | ||
styles.bgColor.ansi256 = {}; | ||
styles.bgColor.ansi = { | ||
ansi: wrapAnsi16(ansi2ansi, 10) | ||
}; | ||
styles.bgColor.ansi256 = { | ||
ansi256: wrapAnsi256(ansi2ansi, 10) | ||
}; | ||
styles.bgColor.ansi16m = { | ||
@@ -125,3 +134,3 @@ rgb: wrapAnsi16m(rgb2rgb, 10) | ||
for (const key of Object.keys(colorConvert)) { | ||
for (let key of Object.keys(colorConvert)) { | ||
if (typeof colorConvert[key] !== 'object') { | ||
@@ -133,2 +142,6 @@ continue; | ||
if (key === 'ansi16') { | ||
key = 'ansi'; | ||
} | ||
if ('ansi16' in suite) { | ||
@@ -135,0 +148,0 @@ styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); |
{ | ||
"name": "ansi-styles", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "ANSI escape codes for styling strings in the terminal", | ||
@@ -16,3 +16,4 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava" | ||
"test": "xo && ava", | ||
"screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" | ||
}, | ||
@@ -50,2 +51,3 @@ "files": [ | ||
"babel-polyfill": "^6.23.0", | ||
"svg-term-cli": "^2.1.1", | ||
"xo": "*" | ||
@@ -52,0 +54,0 @@ }, |
@@ -7,3 +7,3 @@ # ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) | ||
![](screenshot.png) | ||
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900"> | ||
@@ -10,0 +10,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9371
139
4