1.2.2 • Published 3 years ago

zip-postal-codes v1.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

zip-postal-codes

Library for validating Canadian Postal Codes and US Zip Codes

Usage

yarn add zip-postal-codes

  1. Validate Canadian Postal Code

    validatePostal('Alberta', 'T3E 1V3'); // true
    validatePostal('Manitoba', 'R2R 1V4'); // true
    validatePostal('NB', 'S3E 1V6'); // false
  2. Validate US Zip Code

    validateZip('colorado', '80201'); // true
    validateZip('DE', 19901); // true 
    validateZip('LA', '72100'); // false

build

yarn build

yarn install

test

yarn test

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago