unjs / magic-regexp

A compiled-away, type-safe, readable RegExp alternative
https://regexp.dev
MIT License
3.81k stars 53 forks source link

random string generator #402

Open ryoppippi opened 3 months ago

ryoppippi commented 3 months ago

🆒 Your use case

If we can get random string generator from regex, that will be great

🔍 Alternatives you've considered

No response

ℹī¸ Additional info

No response

danielroe commented 3 months ago

Would you explain a bit more about what you mean?

ryoppippi commented 3 months ago

Libraries such as Randexp.js can generate a random string from a regex expression to match it. It would be nice if magic-regexp had such a feature. magic-regexp uses unplugin to optimise processing at build time.
I was hoping for a similar random generator that eliminates extra dependencies at build time.