Check if a number is a valid Australian postcode.
- Install by executing
npm install is-valid-australian-postcode
oryarn add is-valid-australian-postcode
. - Import by adding
import isValidAustralianPostcode from 'is-valid-australian-postcode'
. - Use it by writing
const valid = isValidAustralianPostcode('0919')
isValidAustralianPostcode('0872'); // true
isValidAustralianPostcode(872); // true
isValidAustralianPostcode('0112'); // false
isValidAustralianPostcode('12345'); // false
The MIT License.
Wojciech Maj |