Core-js: Unicode property escapes support

Created on 4 Jun 2019  路  4Comments  路  Source: zloirock/core-js

Do you have some plans to support
https://github.com/tc39/proposal-regexp-unicode-property-escapes either accept contributions?

Firefox and Edge fail to handle such things like:

/\p{Alphabetic}/u.test('袞')

All 4 comments

core-js can't handle new syntax (e.g. new regular expression escapes), you'll need Babel for that.

core-js theoretically can handle this syntax in RegExp constructor like RegExp('\p{Alphabetic}', 'u').test('袞'), but if I understood the situation correctly, it's too costly - it requires adding to the library big part information from Unicode standard - dozens of kilobytes, so I'm not sure that it's worth it.

May it be made like some optional package that need expicit mention to be included and loaded? I can help with importing it from existing babel polyfills.

Yes, we could make it as an optional module. Feel free to add a PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fender picture fender  路  5Comments

straczowski picture straczowski  路  4Comments

brunops picture brunops  路  3Comments

koenpunt picture koenpunt  路  5Comments

dwiyatci picture dwiyatci  路  4Comments