Removing duplicate code points from a string: > [...new Set('acabbba')].join('') 'acb'
-
-
Replying to @rauschma
Unfortunately it fails w/ complex emojis: > [...new Set('


')].join('')
'

'
Ref: https://mathiasbynens.be/notes/javascript-unicode … @mathias2 replies 3 retweets 12 likes -
-
Indeed, it's the emoji system that's actually a mayhem Still we have a problem w/ emoji "count"
In short, if you expect emojis, be careful!1 reply 0 retweets 3 likes
Replying to @MaxArt2501 @rauschma
Emojis are just one example. Multi-code point grapheme clusters are a real thing (unfortunately for those of us who have to deal with it)
3:52 AM - 14 Jun 2017
0 replies
0 retweets
5 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.