function stripColor(str) {
  // eslint-disable-next-line no-control-regex
  const sgrPattern = /\x1b\[\d*(;\d*)*m/g;
  return str.replace(sgrPattern, '');
}
Strip style ANSI escape sequences from the string. In particular, SGR (Select Graphic Rendition) codes.

@param {string} str
@returns {string}
@package