File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 25
25
"author" :
" Kyle Kelley <[email protected] >" ,
26
26
"license" : " MPL-2.0" ,
27
27
"dependencies" : {
28
+ "anser" : " ^1.0.1" ,
28
29
"ansi-to-json" : " ^1.0.0"
29
30
},
30
31
"peerDependencies" : {
Original file line number Diff line number Diff line change 1
1
const React = require ( 'react' ) ;
2
+ const Anser = require ( 'anser' ) ;
3
+
4
+ /**
5
+ * ansiToJson
6
+ * Convert ANSI strings into JSON output.
7
+ *
8
+ * @name ansiToJSON
9
+ * @function
10
+ * @param {String } input The input string.
11
+ * @return {Array } The parsed input.
12
+ */
13
+ function ansiToJSON ( input ) {
14
+ return Anser . ansiToJson ( input , {
15
+ json : true ,
16
+ remove_empty : true ,
17
+ } ) ;
18
+ }
2
19
3
- const ansiToJSON = require ( 'ansi-to-json' ) ;
4
20
5
21
function ansiJSONtoStyleBundle ( ansiBundle ) {
6
22
const style = { } ;
You can’t perform that action at this time.
0 commit comments