1.0.1 • Published 2 years ago

provinces-ca v1.0.1

Weekly downloads
775
License
MIT
Repository
github
Last release
2 years ago

NPM Version CI

CA Provinces

List of CA provinces and territories.

Installation

npm install provinces-ca --save

Usage

import provinces from 'provinces-ca';

console.log(provinces);
// => all provinces and territories

const example1 = provinces.filter((x) => !x.territory);
console.log(example1);
// => provinces only

const example2 = provinces.map((x) => x.abbreviation);
console.log(example2);
// => all provinces/territory abbreviations

The default export from provinces-ca is an array of object with the following structure:

PropertyTypeDescriptionExample
namestringProvince name.Ontario
abbreviationstringProvince abbreviation.ON
territorybooleanIndicates if the province is a territory.false

Development

npm install
npm run build