Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/wojtekmaj/is-valid-australian-postcode
- Owner: wojtekmaj
- License: mit
- Created: 2019-07-25T11:34:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-18T09:39:53.000Z (about 2 months ago)
- Last Synced: 2024-09-19T10:12:58.068Z (about 2 months ago)
- Topics: australia, postcode, postcode-validation, validation
- Language: TypeScript
- Size: 4.36 MB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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'); // trueisValidAustralianPostcode(872); // true
isValidAustralianPostcode('0112'); // false
isValidAustralianPostcode('12345'); // false
```## License
The MIT License.
## Author