Any transpilers out there support ES2015 unicode code points? (babel does not) http://www.2ality.com/2015/01/es6-strings.html …
-
-
Replying to @_jayphelps
This one: https://mothereff.in/regexpu#input=%2F%5Cu%7B1F680%7D%2Fu … does (for /u regex only, though). Made by
@mathias.2 replies 1 retweet 1 like -
Replying to @FakeUnicode @_jayphelps
What makes you say Babel doesn’t support them? It does: https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015&experimental=false&loose=false&spec=false&code=console.log(%0A%20%20'%5Cu%7B1D306%7D'%2C%0A%20%20%60%5Cu%7B1D306%7D%60%2C%0A%20%20%2F%5Cu%7B1D306%7D%2Fu%0A)%3B … (It uses regexpu) +
@FakeUnicode1 reply 1 retweet 1 like -
Replying to @mathias @FakeUnicode
weeeeeeird I tried it today and it didn't work locally or in the REPL. Will try again tomorrow
1 reply 0 retweets 0 likes -
Replying to @_jayphelps
Note that as
@FakeUnicode said, `\u{…}` only works in regexp literals when the `u` flag set. https://mathiasbynens.be/notes/es6-unicode-regex#impact-syntax …2 replies 0 retweets 1 like -
Replying to @mathias @FakeUnicode
oh sorry that's what I was primarily referring to--string literal usage
1 reply 0 retweets 0 likes -
Replying to @_jayphelps
There it should work without any flags/opt-in. Same with template literals. And it seems to… Hmm. +
@FakeUnicode1 reply 0 retweets 0 likes -
Replying to @mathias @FakeUnicode
string literals, not inside regex, is what I'm looking for.pic.twitter.com/idQqrmQg6E
1 reply 0 retweets 0 likes -
Replying to @_jayphelps
Yeah, Babel supports that just fine. +
@FakeUnicode1 reply 0 retweets 0 likes -
Replying to @mathias @FakeUnicode
doesn't look like it, I'm I totally spacing?pic.twitter.com/gtEVxeOY4B
1 reply 0 retweets 0 likes
Ah, now I get it! You’re not seeing those characters because of a rendering issue.pic.twitter.com/7SoBYwdlf0
-
-
Replying to @mathias
oh I was hoping it would convert to escape sequences like regex does.
1 reply 0 retweets 0 likes -
- 2 more replies
New conversation -
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.