hardlounge/client/js/libs/handlebars/ircmessageparser/cleanIrcMessage.js
2017-12-08 21:09:23 +02:00

6 lines
229 B
JavaScript

"use strict";
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;
module.exports = (message) => message.replace(matchFormatting, "").trim();