kickback / ember-countries

Ember addon that provide list of countries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ember-countries

npm version Ember Observer Score

A simple addon that contains the 3 following lists:

  • all the countries in ISO and name format (ie: US - United States).
  • the countries without ZIP Code.
  • the countries with states.

Three helpers are also available:

  • Country ISO to name.
  • Is country with state.
  • Is country without ZIP Code.

Installation

  • ember install ember-countries

Usage

// lists of countries
import {countries, countriesWithoutZip, countriesWithState} from 'ember-countries';
import {countryIsoToValue, isCountryWithState, isCountryWithoutZip} from 'ember-countries';

// How to use lists
export default Ember.Controller.extend({
  ...
  countriesList: countries,
  ...
});

// Example that is using countryIsoToValue
countryIsoToValue('FR'); // -> 'France'

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

##Contributing

PRs welcome!

About

Ember addon that provide list of countries

License:MIT License


Languages

Language:JavaScript 94.3%Language:HTML 5.7%