jka-core
Version:
Library for working with Jedi Academy servers
10 lines (9 loc) • 321 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeColorCodes = void 0;
const removeColorCodes = (str) => {
if (typeof str !== "string")
throw new TypeError('Accepts only string');
return str.replaceAll(/\^\d/g, '');
};
exports.removeColorCodes = removeColorCodes;