What is a good ES6 version of .split('') ?
Not ideal:
'1
\n\0'.match(/(.|\n)/ug)
'1
\n\0'.split(/()/ug)
[cc @mathias @MaximeEuziere]
-
-
Both split on code points. More here: https://mathiasbynens.be/notes/javascript-unicode#accounting-for-astral-symbols … For graphemes you’d need something else. +
@MaximeEuziereThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.