Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

is-aus-postcode

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-aus-postcode

Validate an Australian postcode


Version published
Maintainers
1
Created

NPM version build status

is-aus-postcode

Validate an Australian postcode.

Install

yarn add is-aus-postcode

npm i is-aus-postcode

Usage

var isAusPostcode = require('is-aus-postcode').default

isAusPostcode("2300") // true
isAusPostcode("0100") // false
isAusPostcode("0230") // true

Reference

StateCodes
New South Wales1000–2599, 2620–2899, 2921–2999
Victoria3000–3999, 8000–8999
Queensland4000–4999, 9000–9999
South Australia5000–5999
Western Australia6000–6999
Tasmania7000–7999
Australian Capital Territory0200–0299, 2600–2619, 2900–2920
Northern Territory0800–0999

Reference taken from the Australia Post - Standard Postcode File (PC001).

FAQs

Package last updated on 30 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts