UNPKG
@nickbusey/thelounge
Version:
latest (4.3.2-7)
4.3.2
4.3.2-7
4.3.2-6
4.3.2-5
4.3.2-3
4.3.2-2
4.3.2-1
4.3.1
The self-hosted Web IRC client
thelounge.chat
nickbusey/thelounge
@nickbusey/thelounge
/
client
/
js
/
helpers
/
ircmessageparser
/
cleanIrcMessage.ts
5 lines
(3 loc)
•
221 B
text/typescript
View Raw
1
2
3
4
5
const
matchFormatting =
/\x02|\x1D|\x1F|\x16|\x0F|\x11|\x1E|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi
;
export
default
(
message
:
string
) => message.
replace
(matchFormatting,
""
).
trim
();