1.0.1 • Published 11 months ago

nz-postage-regions v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

NZ Postage Regions

A handy tool for matching post codes with regions in New Zealand. This tool groups post codes into regions that can be used for things like calculating shipping/postage costs etc.

A common use-case is having postage costs stored in a database/CMS for each of the regions. Then depending on a customers post code we can determine what region and cost.

Installation

npm install nz-postage-regions
yarn add nz-postage-regions

Usage

import { getRegion } from 'nz-postage-regions';

const postageRegion = getRegion(postalCode);

Regions

  • Rural

    • northIslandRural
    • southIslandRural
  • Non Rural

    • northland
    • auckland
    • waikato
    • gisborneHawkesBay
    • bayOfPlenty
    • taranakiManawatuWhanganui
    • wellington
    • nelsonMarlboroughTasman
    • canterburyWestCoast
    • otago

License

ISC

1.0.1

11 months ago

1.0.0

11 months ago