File tree 6 files changed +58
-57
lines changed
6 files changed +58
-57
lines changed Original file line number Diff line number Diff line change 1
- * text =auto
2
- * .js text eol =lf
1
+ * text =auto eol =lf
Original file line number Diff line number Diff line change 1
1
node_modules
2
+ yarn.lock
Original file line number Diff line number Diff line change
1
+ package-lock = false
Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
+ - ' 10'
3
4
- ' 8'
4
5
- ' 6'
5
- - ' 4'
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " strip-ansi" ,
3
- "version" : " 4.0.0" ,
4
- "description" : " Strip ANSI escape codes" ,
5
- "license" : " MIT" ,
6
- "repository" : " chalk/strip-ansi" ,
7
- "author" : {
8
- "name" : " Sindre Sorhus" ,
9
-
10
- "url" : " sindresorhus.com"
11
- },
12
- "engines" : {
13
- "node" : " >=4 "
14
- },
15
- "scripts" : {
16
- "test" : " xo && ava"
17
- },
18
- "files" : [
19
- " index.js"
20
- ],
21
- "keywords" : [
22
- " strip" ,
23
- " trim" ,
24
- " remove" ,
25
- " ansi" ,
26
- " styles" ,
27
- " color" ,
28
- " colour" ,
29
- " colors" ,
30
- " terminal" ,
31
- " console" ,
32
- " string" ,
33
- " tty" ,
34
- " escape" ,
35
- " formatting" ,
36
- " rgb" ,
37
- " 256" ,
38
- " shell" ,
39
- " xterm" ,
40
- " log" ,
41
- " logging" ,
42
- " command-line" ,
43
- " text"
44
- ],
45
- "dependencies" : {
46
- "ansi-regex" : " ^3 .0.0"
47
- },
48
- "devDependencies" : {
49
- "ava" : " * " ,
50
- "xo" : " * "
51
- }
2
+ "name" : " strip-ansi" ,
3
+ "version" : " 4.0.0" ,
4
+ "description" : " Strip ANSI escape codes" ,
5
+ "license" : " MIT" ,
6
+ "repository" : " chalk/strip-ansi" ,
7
+ "author" : {
8
+ "name" : " Sindre Sorhus" ,
9
+
10
+ "url" : " sindresorhus.com"
11
+ },
12
+ "engines" : {
13
+ "node" : " >=6 "
14
+ },
15
+ "scripts" : {
16
+ "test" : " xo && ava"
17
+ },
18
+ "files" : [
19
+ " index.js"
20
+ ],
21
+ "keywords" : [
22
+ " strip" ,
23
+ " trim" ,
24
+ " remove" ,
25
+ " ansi" ,
26
+ " styles" ,
27
+ " color" ,
28
+ " colour" ,
29
+ " colors" ,
30
+ " terminal" ,
31
+ " console" ,
32
+ " string" ,
33
+ " tty" ,
34
+ " escape" ,
35
+ " formatting" ,
36
+ " rgb" ,
37
+ " 256" ,
38
+ " shell" ,
39
+ " xterm" ,
40
+ " log" ,
41
+ " logging" ,
42
+ " command-line" ,
43
+ " text"
44
+ ],
45
+ "dependencies" : {
46
+ "ansi-regex" : " ^4 .0.0"
47
+ },
48
+ "devDependencies" : {
49
+ "ava" : " ^0.25.0 " ,
50
+ "xo" : " ^0.23.0 "
51
+ }
52
52
}
Original file line number Diff line number Diff line change 1
1
import test from 'ava' ;
2
- import m from '.' ;
2
+ import stripAnsi from '.' ;
3
3
4
4
test ( 'strip color from string' , t => {
5
- t . is ( m ( '\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m' ) , 'foofoo' ) ;
5
+ t . is ( stripAnsi ( '\u001B[0m\u001B[4m\u001B[42m\u001B[31mfoo\u001B[39m\u001B[49m\u001B[24mfoo\u001B[0m' ) , 'foofoo' ) ;
6
6
} ) ;
7
7
8
8
test ( 'strip color from ls command' , t => {
9
- t . is ( m ( '\u001B[00;38;5;244m\u001B[m\u001B[00;38;5;33mfoo\u001B[0m' ) , 'foo' ) ;
9
+ t . is ( stripAnsi ( '\u001B[00;38;5;244m\u001B[m\u001B[00;38;5;33mfoo\u001B[0m' ) , 'foo' ) ;
10
10
} ) ;
11
11
12
12
test ( 'strip reset;setfg;setbg;italics;strike;underline sequence from string' , t => {
13
- t . is ( m ( '\u001B[0;33;49;3;9;4mbar\u001B[0m' ) , 'bar' ) ;
13
+ t . is ( stripAnsi ( '\u001B[0;33;49;3;9;4mbar\u001B[0m' ) , 'bar' ) ;
14
14
} ) ;
You can’t perform that action at this time.
0 commit comments