node/deps/npm/lib/utils/ansi-trim.js
Ruy Adorno 3c0672e3f6
deps: upgrade npm to 7.5.1
PR-URL: https://github.com/nodejs/node/pull/37177
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2021-02-02 10:31:47 +01:00

4 lines
173 B
JavaScript

const r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' +
'\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g')
module.exports = str => str.replace(r, '')