1.0.1 • Published 2 years ago

zuora-codes v1.0.1

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

zuora-codes

Mappings of US State/Canadian Province to Name and back again 🧙

Based on:

Installation

npm install zuora-codes
# or via yarn
yarn add zuora-codes

Usage

getUnitedStatesStateCode

Gets US state code by state's name or throws an error if state name is incorrect.

Type signature
(stateCode: UnitedStatesStateName | string) => string;

getUnitedStatesStateName

Gets US state name by state's code or throws an error if state code is incorrect.

Type signature
(stateCode: UnitedStatesStateCode | string) => string;

getCanadianProvinceCode

Gets Canadian province code by province's name or throws an error if province name is incorrect.

Type signature
(stateCode: CanadianProvinceName | string) => string;

getCanadianProvinceName

Gets Canadian province name by province's code or throws an error if province code is incorrect.

Type signature
(stateCode: CanadianProvinceCode | string) => string;