mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-13 22:56:18 +00:00
8 lines
211 B
JavaScript
8 lines
211 B
JavaScript
|
function ansiTrim (str) {
|
||
|
var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' +
|
||
|
'\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g')
|
||
|
return str.replace(r, '')
|
||
|
}
|
||
|
|
||
|
module.exports = ansiTrim
|