Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
msg = msg.replace(/\[\[(.*)\]\]/g, function(match) {
return colors.bgWhite(colors.black(match.substring(2, match.length - 2)));
});