2.4.2 • Published 2 years ago

emoji-flags-to-country v2.4.2

Weekly downloads
55
License
MIT
Repository
github
Last release
2 years ago

Emoji country flags to country code

npm.io Coverage Status Maintainability npm Donate

NPM

Convert emoji country flags to country code ISO 3166.

Install

npm i emoji-flags-to-country

Example

const { flagToCountry, getFlagsInText } = require('emoji-flags-to-country');

const result1 = flagToCountry('🇮🇹');
const result2 = flagToCountry('🇺🇸');
const result3 = flagToCountry('🇪🇸');
console.log(result1); // IT
console.log(result2); // US
console.log(result3); // ES

const result4 = getFlagsInText('This text has 🇺🇸 emoji flags 🇮🇹');
console.log(result4); // ['🇺🇸', '🇮🇹'];

Run tests

npm test

Run lint

npm run lint

Author

2.4.2

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.3.0

3 years ago

2.2.3

3 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

5 years ago