hardlounge/client/js/helpers/ircmessageparser/cleanIrcMessage.js

7 lines
230 B
JavaScript
Raw Normal View History

"use strict";
2022-02-09 23:27:34 +00:00
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;
2017-11-22 14:06:32 +00:00
module.exports = (message) => message.replace(matchFormatting, "").trim();