Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wojtekmaj/is-valid-australian-postcode

Check if a number is a valid Australian postcode.
https://github.com/wojtekmaj/is-valid-australian-postcode

australia postcode postcode-validation validation

Last synced: about 1 month ago
JSON representation

Check if a number is a valid Australian postcode.

Awesome Lists containing this project

README

        

[![npm](https://img.shields.io/npm/v/is-valid-australian-postcode.svg)](https://www.npmjs.com/package/is-valid-australian-postcode) ![downloads](https://img.shields.io/npm/dt/is-valid-australian-postcode.svg) [![CI](https://github.com/wojtekmaj/is-valid-australian-postcode/actions/workflows/ci.yml/badge.svg)](https://github.com/wojtekmaj/is-valid-australian-postcode/actions)

# Is-Valid-Australian-Postcode

Check if a number is a valid Australian postcode.

## tl;dr

- Install by executing `npm install is-valid-australian-postcode` or `yarn add is-valid-australian-postcode`.
- Import by adding `import isValidAustralianPostcode from 'is-valid-australian-postcode'`.
- Use it by writing `const valid = isValidAustralianPostcode('0919')`

## Examples

```ts
isValidAustralianPostcode('0872'); // true

isValidAustralianPostcode(872); // true

isValidAustralianPostcode('0112'); // false

isValidAustralianPostcode('12345'); // false
```

## License

The MIT License.

## Author



Wojciech Maj


Wojciech Maj