Package Exports
- countries-codes-names
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (countries-codes-names) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
countries-codes-names package gives you to acces All countries Names and Codes .It has more than 235 countries to access simply search any country with country name.
Usage
npm install --save countries-codes-names
let countries = require('countries-codes-names');
//Get single country details console.log(countries.SriLanka());
output : { name: 'Sri Lanka', key: 'LK', code: 'LK' }
Using this JSON you can access name and code property.
//get all countries list as JSON
console.log(countries.countriesList());
Star the repository if you liked.