country-flag-emoji-json
Advanced tools
Comparing version 1.0.2 to 2.0.0
{ | ||
"name": "country-flag-emoji-json", | ||
"version": "1.0.2", | ||
"description": "Country flag emojis in JSON format", | ||
"version": "2.0.0", | ||
"description": "Country flag emojis in JSON format and SVG image.", | ||
"keywords": [ | ||
@@ -16,9 +16,9 @@ "country", | ||
}, | ||
"license": "MIT", | ||
"license": "CC-BY-4.0", | ||
"author": { | ||
"name": "Risan Bagja Pradana", | ||
"email": "risanbagja@gmail.com", | ||
"url": "https://bagja.net" | ||
"url": "https://risanb.com" | ||
}, | ||
"main": "json/flag-emojis.pretty.json", | ||
"main": "dist/index.json", | ||
"repository": { | ||
@@ -29,23 +29,12 @@ "type": "git", | ||
"scripts": { | ||
"build": "scripts/build.js", | ||
"lint": "eslint ./", | ||
"lint-fix": "eslint ./ --fix", | ||
"prepublishOnly": "npm run lint && npm run test", | ||
"test": "npm run build && jest" | ||
"build": "scripts/build.js" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^5.9.0", | ||
"eslint-config-airbnb-base": "^13.1.0", | ||
"eslint-config-prettier": "^3.3.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"jest": "^23.6.0", | ||
"lodash.keyby": "^4.6.0", | ||
"prettier": "^1.15.2", | ||
"rimraf": "^2.6.2", | ||
"write-to-file": "^1.0.1" | ||
"axios": "^0.21.4", | ||
"fs-extra": "^10.0.0", | ||
"lodash": "^4.17.21" | ||
}, | ||
"engines": { | ||
"node": ">=11.0.0" | ||
"node": ">=14.0.0" | ||
} | ||
} |
106
README.md
# Country Flag Emoji JSON | ||
[![Build Status](https://badgen.net/travis/risan/npm-boilerplate-node-browser)](https://travis-ci.org/risan/npm-boilerplate-node-browser) | ||
[![Greenkeeper](https://badges.greenkeeper.io/risan/npm-boilerplate-node-browser.svg)](https://greenkeeper.io) | ||
[![Latest Version](https://badgen.net/npm/v/npm-boilerplate-node-browser)](https://www.npmjs.com/package/npm-boilerplate-node-browser) | ||
[![Latest Version](https://badgen.net/npm/v/country-flag-emoji-json)](https://www.npmjs.com/package/country-flag-emoji-json) | ||
Country flag emojis in JSON format. | ||
Country flag emojis in JSON format and SVG image. | ||
## CDN | ||
The JSON files are available over a CDN: | ||
Check out the [`/dist`](https://github.com/risan/country-flag-emoji-json/tree/master/dist) directory to see all available JSON files and SVG images. All These files are also available through [JSDELIVR](https://www.jsdelivr.com/package/npm//country-flag-emoji-json?path=dist) CDN. | ||
* Flag emojis: [unpkg.com/country-flag-emoji-json@latest/json/flag-emojis.pretty.json](https://unpkg.com/country-flag-emoji-json@latest/json/flag-emojis.pretty.json) | ||
* Flag emojis (minified): [unpkg.com/country-flag-emoji-json@latest/json/flag-emojis.json](https://unpkg.com/country-flag-emoji-json@latest/json/flag-emojis.json) | ||
### List of Country Flag Emojis | ||
```json | ||
You can use the following URL to get a list of all country flag emojis: | ||
- [`cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/index.json`](https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/index.json) | ||
```js | ||
[ | ||
{ | ||
"name": "Ascension Island", | ||
"code": "AC", | ||
"emoji": "🇦🇨", | ||
"unicode": "U+1F1E6 U+1F1E8", | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AC.svg" | ||
}, | ||
// More items... | ||
{ | ||
"name": "Indonesia", | ||
"code": "ID", | ||
"emoji": "🇮🇩", | ||
"unicode": "U+1F1EE U+1F1E9", | ||
"name": "Indonesia", | ||
"emoji": "🇮🇩" | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ID.svg" | ||
}, | ||
// More items... | ||
] | ||
``` | ||
* Flag emojis keyed by country code: [unpkg.com/country-flag-emoji-json@latest/json/flag-emojis-by-code.pretty.json](https://unpkg.com/country-flag-emoji-json@latest/json/flag-emojis-by-code.pretty.json) | ||
* Flag emojis keyed by country code (minified): [unpkg.com/country-flag-emoji-json@latest/json/flag-emojis-by-code.json](https://unpkg.com/country-flag-emoji-json@latest/json/flag-emojis-by-code.json) | ||
- `name`: The country name | ||
- `code`: The country code based on [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | ||
- `emoji`: The country flag emoji | ||
- `unicode`: The unicode code points for presenting the emoji flag | ||
- `image`: The country flag SVG image url | ||
```json | ||
### List of Country Flag Emojis by Country Code | ||
If you prefer the list to be keyed by the country code, use the following URL: | ||
- [`cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/by-code.json`](https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/by-code.json) | ||
```js | ||
{ | ||
"AC": { | ||
"name": "Ascension Island", | ||
"emoji": "🇦🇨", | ||
"unicode": "U+1F1E6 U+1F1E8", | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AC.svg" | ||
}, | ||
// More items... | ||
"ID": { | ||
"code": "ID", | ||
"name": "Indonesia", | ||
"emoji": "🇮🇩", | ||
"unicode": "U+1F1EE U+1F1E9", | ||
"name": "Indonesia", | ||
"emoji": "🇮🇩" | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ID.svg" | ||
}, | ||
// More items... | ||
} | ||
``` | ||
### Country Code for Subdivision Flags | ||
As of 2021, there are three subdivision flags included: England, Scotland, and Wales. These countries are not listed on [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), thus three of them listed with a non-standard `code` field: | ||
```js | ||
[ | ||
// More items... | ||
{ | ||
"name": "England", | ||
"code": "ENGLAND", | ||
"emoji": "🏴", | ||
"unicode": "U+1F3F4 U+E0067 U+E0062 U+E0065 U+E006E U+E0067 U+E007F", | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ENGLAND.svg" | ||
}, | ||
{ | ||
"name": "Scotland", | ||
"code": "SCOTLAND", | ||
"emoji": "🏴", | ||
"unicode": "U+1F3F4 U+E0067 U+E0062 U+E0073 U+E0063 U+E0074 U+E007F", | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SCOTLAND.svg" | ||
}, | ||
{ | ||
"name": "Wales", | ||
"code": "WALES", | ||
"emoji": "🏴", | ||
"unicode": "U+1F3F4 U+E0067 U+E0062 U+E0077 U+E006C U+E0073 U+E007F", | ||
"image": "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WALES.svg" | ||
} | ||
] | ||
``` | ||
## Generate the JSON | ||
@@ -75,12 +134,11 @@ | ||
* [country-flag-emoji](https://github.com/risan/country-flag-emoji): List of country codes and its flag emojis. | ||
- [country-flag-emoji](https://github.com/risan/country-flag-emoji): List of country codes and its flag emojis. | ||
## Data Source | ||
- Emojis data used to generate the JSON files are provided by the [Unicode Consortium](https://www.unicode.org/). | ||
- All country flag SVG images are designed by [OpenMoji](https://openmoji.org/) – the open-source emoji and icon project. License: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) | ||
## License | ||
[MIT](https://github.com/risan/country-flag-emoji-json/blob/master/LICENSE) © [Risan Bagja Pradana](https://bagja.net) | ||
> Emojis data used to generate the JSON files are provided by the [Unicode Consortium](https://www.unicode.org/). | ||
> | ||
> Copyright © 1991-2018 Unicode, Inc. All rights reserved. | ||
> | ||
> By using this package you agree to the [Unicode Terms of Use](https://www.unicode.org/copyright.html). | ||
[CC-BY-SA 4.0](https://github.com/risan/country-flag-emoji-json/blob/master/LICENSE.txt) · [Risan Bagja Pradana](https://risanb.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
451394
3
266
144
3
70
337
1