lib/emoji.js
function stripColons (str) {
  var colonIndex = str.indexOf(':');
  if (colonIndex > -1) {
    // :emoji: (http://www.emoji-cheat-sheet.com/)
    if (colonIndex === str.length - 1) {
      str = str.substring(0, colonIndex);
      return stripColons(str);
    } else {
      str = str.substr(colonIndex + 1);
      return stripColons(str);
    }
  }

  return str;
}
function stripColons (str) {
  var colonIndex = str.indexOf(':');
  if (colonIndex > -1) {
    // :emoji: (http://www.emoji-cheat-sheet.com/)
    if (colonIndex === str.length - 1) {
      str = str.substring(0, colonIndex);
      return stripColons(str);
    } else {
      str = str.substr(colonIndex + 1);
      return stripColons(str);
    }
  }

  return str;
}
function stripColons ( str ) { var colonIndex = str . indexOf ( ':' ) ; if ( colonIndex > - 1 ) { // :emoji: (http://www.emoji-cheat-sheet.com/) if ( colonIndex === str . length - 1 ) { str = str . substring ( 0 , colonIndex ) ; return stripColons ( str ) ; } else { str = str . substr ( colonIndex + 1 ) ; return stripColons ( str ) ; } } return str ; }
Removes colons on either side
of the string if present
@param  {string} str
@return {string}
Removes colons on either side of the string if present