Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Export the regex #6

Open
cobaltt7 opened this issue Mar 6, 2024 · 1 comment
Open

Feature request: Export the regex #6

cobaltt7 opened this issue Mar 6, 2024 · 1 comment

Comments

@cobaltt7
Copy link

cobaltt7 commented Mar 6, 2024

Could the regular expression used internally to match Twemoji be exported? I think it could be very useful to find supported Unicode emojis within a string. Over 85% of this package's source code is the regex, and it's not even directly usable, which just seems a bit odd to me. It's really the most important part of the whole package.

You can currently import it directly with the full path (import twemojiRegexp from "@twemoji/parser/dist/lib/regex.js";), but it'd be preferable if it was explicitly exported.

@jdecked
Copy link
Owner

jdecked commented Apr 3, 2024

Could you tell me a bit more about your use case @RedGuy12? Is there some reason you're against using the parse function exported by the package to use the regex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants