index.js
function showInvisibles(str) {
  let ret = '';
  for (let i = 0; i < str.length; i++) {
    switch (str[i]) {
      case ' ':
        ret += '·'; // Middle Dot, \u00B7
        break;
      case '\n':
        ret += '⏎'; // Return Symbol, \u23ce
        break;
      case '\t':
        ret += '↹'; // Left Arrow To Bar Over Right Arrow To Bar, \u21b9
        break;
      case '\r':
        ret += '␍'; // Carriage Return Symbol, \u240D
        break;
      default:
        ret += str[i];
        break;
    }
  }
  return ret;
}
function showInvisibles(str) {
  let ret = '';
  for (let i = 0; i < str.length; i++) {
    switch (str[i]) {
      case ' ':
        ret += '·'; // Middle Dot, \u00B7
        break;
      case '\n':
        ret += '⏎'; // Return Symbol, \u23ce
        break;
      case '\t':
        ret += '↹'; // Left Arrow To Bar Over Right Arrow To Bar, \u21b9
        break;
      case '\r':
        ret += '␍'; // Carriage Return Symbol, \u240D
        break;
      default:
        ret += str[i];
        break;
    }
  }
  return ret;
}
function showInvisibles ( str ) { let ret = '' ; for ( let i = 0 ; i < str . length ; i ++ ) { switch ( str [ i ] ) { case ' ' : ret += '·'; / Middle Dot, \u00B7 break ; case '\n' : ret += '⏎';  /  Return Symbol, \u23ce break ; case '\t' : ret += '↹';  /  Left Arrow To Bar Over Right Arrow To Bar, \u21b9 break ; case '\r' : ret += '␍';  /  Carriage Return Symbol, \u240D break ; default : ret += str [ i ] ; break ; } } return ret ; }
Converts invisible characters to a commonly recognizable visible form.
@param {string} str - The string with invisibles to convert.
@returns {string} The converted string.
Converts invisible characters to a commonly recognizable visible form .