JSPM

@esetnik/provinces-ca

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q48679F
  • License MIT

List of CA provinces and territories.

Package Exports

  • @esetnik/provinces-ca
  • @esetnik/provinces-ca/dist/index.js

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 (@esetnik/provinces-ca) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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:

Property Type Description Example
name string Province name. Ontario
abbreviation string Province abbreviation. ON
territory boolean Indicates if the province is a territory. false

Development

npm install
npm run build