# easy-countries-list

> Easy countries list manager

Latest version **1.1.0** (published 2016-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install easy-countries-list
pnpm add easy-countries-list
yarn add easy-countries-list
bun add easy-countries-list
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-04-18 |
| First published | 2016-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alessandro Casazza |
| Maintainers | imasterale |
| Keywords | easy, countries, list, country |

## Links

- npm: https://www.npmjs.com/package/easy-countries-list
- npm.io page: https://npm.io/package/easy-countries-list

## Recent versions

- 1.1.0 (latest) — 2016-04-18
- 1.0.0 — 2016-03-03

## README

# Easy Countries List [![npm version](https://badge.fury.io/js/easy-countries-list.svg)](https://badge.fury.io/js/easy-countries-list) [![Build Status](https://travis-ci.org/iMasterAle/easy-countries-list.svg?branch=master)](https://travis-ci.org/iMasterAle/easy-countries-list)

This package is a easy standar countries list.

__Salesforce__ and __Zuora__ used this countries list.

## Installation

`npm i --save easy-countries-list`

## Usage

### Function:

- #### Get all countries:

```js
import EasyCountriesList from 'easy-countries-list';

const countries = EasyCountriesList.getAllCountries();
```
_Return object:_
```js
[
  {...},
  {
    name: 'United States',
    countryCode: 'US' // ISO alpha-2
  },
  {...}
]
```

- #### Filter by Country Name:

```js
import EasyCountriesList from 'easy-countries-list';

const countries = EasyCountriesList.filterByCountryName('united states');
```
_Return object:_
```js
{
  name: 'United States',
  countryCode: 'US', // ISO alpha-2
  countryCodeThree: 'USA' // ISO alpha-3
}
```

- #### Filter by Country Code:

```js
import EasyCountriesList from 'easy-countries-list';

const countries = EasyCountriesList.filterByCountryCode('Us');
```
_Return object:_
```js
{
  name: 'United States',
  countryCode: 'US', // ISO alpha-2
  countryCodeThree: 'USA' // ISO alpha-3
}
```

- #### Filter by Country Code Three:

```js
import EasyCountriesList from 'easy-countries-list';

const countries = EasyCountriesList.filterByCountryCodeThree('Usa');
```
_Return object:_
```js
{
  name: 'United States',
  countryCode: 'US', // ISO alpha-2
  countryCodeThree: 'USA' // ISO alpha-3
}
```

## Next Feature

- Add states list for US and Canada.

---
_Source: https://npm.io/package/easy-countries-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
