country-regex

Hash map of country ISO-3 codes to regular expression identifiers

MIT License

Downloads
807.8K
Stars
3
Committers
1

country-regex

Hash map of country ISO-3 code to regular expression identifier. Regular expression data is taken from Vincent Arel-Bundock's countrycode R package (GPL-3 License). Big ups! 🍻

Install

npm install country-regex

Usage

var countryRegex = require('country-regex')

// and then for example:
countryRegex['USA']

// => 'united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)'

Credits

2017 Étienne Tétreault-Pinard. MIT License

Package Rankings
Top 34.04% on Repo1.maven.org
Top 4.48% on Npmjs.org
Badges
Extracted from project README
npm version gzip size Standard - JavaScript Style Guide