Skip to content

Commit aa974fb

Browse files
committed
Require Node.js 8
1 parent 4fea0e7 commit aa974fb

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3+
- '12'
34
- '10'
45
- '8'
5-
- '6'

index.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,8 @@ function assembleStyles() {
7878
styles.color.grey = styles.color.blackBright;
7979
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
8080

81-
for (const groupName of Object.keys(styles)) {
82-
const group = styles[groupName];
83-
84-
for (const styleName of Object.keys(group)) {
85-
const style = group[styleName];
86-
81+
for (const [groupName, group] of Object.entries(styles)) {
82+
for (const [styleName, style] of Object.entries(group)) {
8783
styles[styleName] = {
8884
open: `\u001B[${style[0]}m`,
8985
close: `\u001B[${style[1]}m`
@@ -131,13 +127,11 @@ function assembleStyles() {
131127
rgb: wrapAnsi16m(rgb2rgb, 10)
132128
};
133129

134-
for (let key of Object.keys(colorConvert)) {
135-
if (typeof colorConvert[key] !== 'object') {
130+
for (let [key, suite] of Object.entries(colorConvert)) {
131+
if (typeof suite !== 'object') {
136132
continue;
137133
}
138134

139-
const suite = colorConvert[key];
140-
141135
if (key === 'ansi16') {
142136
key = 'ansi';
143137
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "sindresorhus.com"
1111
},
1212
"engines": {
13-
"node": ">=6"
13+
"node": ">=8"
1414
},
1515
"scripts": {
1616
"test": "xo && ava",
@@ -42,11 +42,11 @@
4242
"text"
4343
],
4444
"dependencies": {
45-
"color-convert": "^1.9.2"
45+
"color-convert": "^2.0.0"
4646
},
4747
"devDependencies": {
48-
"ava": "*",
48+
"ava": "^1.4.1",
4949
"svg-term-cli": "^2.1.1",
50-
"xo": "*"
50+
"xo": "^0.24.0"
5151
}
5252
}

screenshot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const style = require('.');
44
const width = 55;
55
let lineLength = 0;
66

7-
for (const [key, val] of Object.entries(style)) {
8-
let code = val.open;
7+
for (const [key, value] of Object.entries(style)) {
8+
let code = value.open;
99
let projectedLength = lineLength + key.length + 1;
1010

1111
if (key === 'reset' || key === 'hidden' || key === 'grey' || key.includes('Bright')) {

0 commit comments

Comments
 (0)