country-regex

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
country-regex
1.1.07 years ago8 years agoMinified + gzip package size for country-regex in KB

Readme

country-regex
!npm version11a !gzip size81a
!Build Status22a !Dependency Status33a !devDependency Status44a
Hash map of country ISO-35 code to regular expression identifier. Regular expression data is taken from Vincent Arel-Bundock6's countrycode7 R package (GPL-3 License). Big ups! :beers:

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
Standard - JavaScript Style
Guide