Ad
Strings
Code
Diff
  • const isUnique = (string) => {
      const chars = [...new Intl.Segmenter().segment(string)].map(x => x.segment)
      
      return new Set(chars).size === chars.length
    }
    
    • const isUnique = string => new Set(string).size === string.length
    • const isUnique = (string) => {
    • const chars = [...new Intl.Segmenter().segment(string)].map(x => x.segment)
    • return new Set(chars).size === chars.length
    • }