File tree 5 files changed +14
-15
lines changed
5 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
+ - ' 12'
3
4
- ' 10'
4
5
- ' 8'
5
- - ' 6'
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a
3
3
4
4
@example
5
5
```
6
- import stripAnsi from 'strip-ansi';
6
+ import stripAnsi = require( 'strip-ansi') ;
7
7
8
8
stripAnsi('\u001B[4mUnicorn\u001B[0m');
9
9
//=> 'Unicorn'
@@ -12,4 +12,6 @@ stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
12
12
//=> 'Click'
13
13
```
14
14
*/
15
- export default function stripAnsi ( string : string ) : string ;
15
+ declare function stripAnsi ( string : string ) : string ;
16
+
17
+ export = stripAnsi ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const ansiRegex = require ( 'ansi-regex' ) ;
3
3
4
- const stripAnsi = string => typeof string === 'string' ? string . replace ( ansiRegex ( ) , '' ) : string ;
5
-
6
- module . exports = stripAnsi ;
7
- module . exports . default = stripAnsi ;
4
+ module . exports = string => typeof string === 'string' ? string . replace ( ansiRegex ( ) , '' ) : string ;
Original file line number Diff line number Diff line change 1
- import { expectType } from 'tsd-check ' ;
2
- import stripAnsi from '.' ;
1
+ import { expectType } from 'tsd' ;
2
+ import stripAnsi = require ( '.' ) ;
3
3
4
4
expectType < string > ( stripAnsi ( '\u001B[4mcake\u001B[0m' ) ) ;
Original file line number Diff line number Diff line change 10
10
"url" : " sindresorhus.com"
11
11
},
12
12
"engines" : {
13
- "node" : " >=6 "
13
+ "node" : " >=8 "
14
14
},
15
15
"scripts" : {
16
- "test" : " xo && ava && tsd-check "
16
+ "test" : " xo && ava && tsd"
17
17
},
18
18
"files" : [
19
19
" index.js" ,
44
44
" text"
45
45
],
46
46
"dependencies" : {
47
- "ansi-regex" : " ^4.1 .0"
47
+ "ansi-regex" : " ^5.0 .0"
48
48
},
49
49
"devDependencies" : {
50
- "ava" : " ^1.3.1 " ,
51
- "tsd-check " : " ^0.5 .0" ,
52
- "xo" : " ^0.24.0 "
50
+ "ava" : " ^2.4.0 " ,
51
+ "tsd" : " ^0.10 .0" ,
52
+ "xo" : " ^0.25.3 "
53
53
}
54
54
}
You can’t perform that action at this time.
0 commit comments