mathiasbynens/regexpu

A source code transpiler that enables the use of ES2015 Unicode regular expressions in ES5.

58
/ 100
Established

Converts ES2015 Unicode regex patterns with the `u` flag into ES5-compatible surrogate pair sequences, handling astral plane characters like emoji through systematic transpilation of regex literals. Integrates directly with major transpilers—Babel, Traceur, Bublé, and esnext—and relies on regjsparser for AST parsing and regenerate for Unicode range generation. Supports both CLI and programmatic API usage, though it doesn't handle dynamic RegExp constructors or complex edge cases like lone surrogates.

240 stars and 948,616 monthly downloads. No commits in the last 6 months. Available on npm.

Stale 6m
Maintenance 0 / 25
Adoption 20 / 25
Maturity 25 / 25
Community 13 / 25

How are scores calculated?

Stars

240

Forks

19

Language

JavaScript

License

MIT

Last pushed

Sep 18, 2024

Monthly downloads

948,616

Commits (30d)

0

Dependencies

3

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/mathiasbynens/regexpu"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.