ansi-trim.js 211 B

1234567
  1. function ansiTrim (str) {
  2. var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' +
  3. '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g')
  4. return str.replace(r, '')
  5. }
  6. module.exports = ansiTrim