UNPKG
npx
Version:
latest (10.2.2)
10.2.2
10.2.1
10.2.0
10.1.1
10.0.1
9.7.1
9.7.0
9.6.0
9.5.0
9.4.1
9.4.0
9.3.2
9.3.1
9.2.2
9.2.1
9.2.0
9.1.0
9.0.7
9.0.5
9.0.4
9.0.3
9.0.2
9.0.1
9.0.0
8.1.1
8.1.0
8.0.1
8.0.0
7.0.0
6.2.0
6.1.0
6.0.0
5.4.0
5.3.0
5.2.0
5.1.3
5.1.2
5.1.1
5.1.0
5.0.3
5.0.2
5.0.1
5.0.0
4.0.3
4.0.2
4.0.1
4.0.0
3.0.0
2.1.0
2.0.1
2.0.0
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
execute npm package binaries
github.com/npm/npx
npm/npx
npx
/
node_modules
/
npm
/
lib
/
utils
/
ansi-trim.js
8 lines
(6 loc)
•
211 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
ansiTrim
(
str
) { var r = new
RegExp
(
'
\x
1b(?:\\[(?:\
\d
+[ABCDEFGJKSTm]|\
\d
+;\
\d
+[Hfm]|'
+
'\
\d
+;\
\d
+;\
\d
+m|6n|s|u|\\?25[lh])|\
\w
)'
,
'g'
)
return
str
.
replace
(r,
''
) } module.exports = ansiTrim