Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Publish the "country code -> flag emoji" helper as a separate library #4

Open
jviide opened this issue Oct 27, 2016 · 4 comments
Open
Labels

Comments

@jviide
Copy link
Contributor

jviide commented Oct 27, 2016

Publish the "country code -> flag emoji" helper as a separate library, currently located at lib/country-flag.js.

Double-check that npm doesn't already have a replacement with a suitably small code side. If there is one, then use it instead.

@jviide jviide added the task label Oct 27, 2016
@oherrala
Copy link
Member

Quick search yielded two potential libraries:

I like the emoji-flag package. It's minimalistic. emoji-flags has ~40 kB JSON database of countries (which burden to keep up to date).

@jviide
Copy link
Contributor Author

jviide commented Oct 28, 2016

uriteller used emoji-flags earlier. The size was the reason why I removed it.

@jviide
Copy link
Contributor Author

jviide commented Oct 28, 2016

emoji-flag depends on punycode2. In our usecase (browser rendering) we can use String.fromCodePoint instead?

@jviide
Copy link
Contributor Author

jviide commented Oct 28, 2016

In fact it seems that the part of punycode2 that emoji-flag uses does its conversions with String.fromCodePoint.

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

No branches or pull requests

2 participants