2019-03-24 08:27:49 +01:00

5 lines
151 B
JavaScript

'use strict';
module.exports = function (str) {
return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str;
};