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

Replace dependency emoji-regex with emoji-regex-xs #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slevithan
Copy link

@slevithan slevithan commented Jun 28, 2024

This replaces emoji-regex (~13 KB uncompressed) with emoji-regex-xs (~0.3 KB), a drop-in replacement that shares its API and its 3,000+ tests, but reduces its file size by 97%. The difference is that it uses the version of Unicode supported natively by your environment, rather than hard coding code points from a specific version of Unicode.

I've also removed a TODO about replacing the regex with /\p{RGI_Emoji}/v when targeting Node.js 20, since RGI_Emoji is incomplete compared to real-world emoji use. The readme includes details, but essentially, a superset of RGI_Emoji is needed to match user expectations, since e.g. the iOS emoji keyboard overqualifies some emoji.

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

Successfully merging this pull request may close these issues.

1 participant