[javascript] changeCommaToHash

  const changeCommaToHash = (str: string) => {
    if (!str) return str;
    return str
      .split(',')
      .map(tag => '#' + tag)
      .join(' ');
  };

links

social