Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

is-country

1.0.1 • Public • Published

is-country

Returns true if your input is a country. Supports country name, ISO 3166-1 alpha-2, alpha-3, and numeric country codes.

Usage

Run npm i is-country and then you can use this gloriously useful utility, as such:

const isCountry = require("is-country");
async function main()
{
    console.log(await isCountry("DE")); // true
    console.log(await isCountry("XX")); // false
}
main();

Install

npm i is-country

DownloadsWeekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.29 kB

Total Files

4

Last publish

Collaborators

  • avatar