iso3166-2
v0.1.0-beta
Published
Tiny, fast, modular ISO 3166-2 lookup library
Downloads
37
Maintainers
Readme
iso3166-2 (UNDER DEVELOPMENT/BETA)
this isn't ready for primetime just yet :)... sorry.
The smallest, fastest, node module for resolving ISO 3166-2 geographic subdivisions. Browserify/Webpack friendly.
it's totally small!
$ browserify iso3166-2.js | wc -c | numfmt --to=iec --suffix=B --format="%3f"
$ browserify iso3166-2.js | uglifyjs | wc -c | numfmt --to=iec --suffix=B --format="%3f"
$ browserify iso3166-2.js | uglifyjs - --screw-ie8 --compress --mangle | yuicompressor --type js -o iso3166-2.js && cat iso3166-2.js | wc -c | numfmt --to=iec --suffix=B --format="%3f"
with over 240 countries and completely update to date with ISO standards!
> var countries = require('./countries.json')
> Object.keys(countries).length
250
>
...
example usage
var iso31662 = require('iso3166-2')