Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
country-region-data
Advanced tools
This repo contains a static JSON file of country names, country short codes, country regions, and country region short codes. All country names and short codes are guaranteed to be unique. Similarly, all regions and region short codes within a single country are guaranteed to be unique.
I created this repo to house the raw data used for the country-region-selector, react-country-region-selector scripts. I didn't want to duplicate it in multiple places and hey, it seemed like this could be useful as a standalone repo.
See the data.json
file for the data. The JSON is of the form:
[
{
"countryName":"Ecuador",
"countryShortCode":"EC",
"regions":[
{
"name":"Azuay",
"shortCode":"A"
},
...
}
},
...
]
The state/prov abbreviations are not yet complete, so pull requests welcome! Regions that need ISO3166-2 codes can
be identified by having a missing shortCode
property for each region. You can find them by cloning the repo, then
running:
npm install
grunt findIncomplete
That'll list all countries with regions that are missing region short codes. Wikipedia has a lot of the data listed here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Before contributing a PR, please validate the JSON content (if you don't, Travis will catch it for you!). To do that, run the following on your command line:
npm install
grunt validate
That'll throw an error if the JSON is invalid or if some duplicate names were accidentally introduced. The error messages are pretty clear, I think.
1.4.0
- July 25, 2017. Version bump, no changes.1.3.6
- July 5, 2017. JS version added of the json file (thanks jayeb!!). Minor bug fixes.1.3.5
- Apr 20, 2017. Misc updates. Thanks all!1.3.4
- Dec 31, 2016. Mexico region update - thanks richi3f!1.3.3
- Dec 22, 2016. French region fix - thanks JMartelot!1.3.2
- Oct 31, 2016. Lots more region short codes (thanks again, ellenhutchings!).1.3.1
- Sept 23, 2016. Fix for incorrect shortcodes in Japanese prefectures.1.3.0
- July 1, 2016. Improved validation added to ensure uniqueness of country names, short codes, region names and
shortcodes. Various country region additions / updates.1.2.1
- Jun 7, 2016. Taiwan country name change. Travis build status added + basic JSON syntax validation.1.2.0
- May 14, 2015. Lots more region short codes (again, thanks Ellen!). JSON syntax fixes.1.1.1
- April 30, 2016. JSON syntax fixes.1.1.0
- April 30, 2016. Looooads of new region shortcodes added thanks to ellenhutchings. Thanks, Ellen!1.0.0
- April 29, 2016. initial versionMIT.
FAQs
List of countries, regions, and their shortcodes.
The npm package country-region-data receives a total of 16,801 weekly downloads. As such, country-region-data popularity was classified as popular.
We found that country-region-data demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.