@brazilian-utils/is-valid-cep

Check if CEP is valid.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@brazilian-utils/is-valid-cep
Minified + gzip package size for @brazilian-utils/is-valid-cep in KB

Readme

@brazilian-utils/is-valid-cep

Check if CEP is valid

Installation

# Yarn
yarn add @brazilian-utils/is-valid-cep

# npm
npm install @brazilian-utils/is-valid-cep --save

# UMD
<script type='text/javascript' src='https://unpkg.com/@brazilian-utils/is-valid-cep/dist/index.umd.js'></script>

Usage

import isValidCep from '@brazilian-utils/is-valid-cep';

isValidCep('92500000'); // true
isValidCep('92500-000'); // true
isValidCep('8434850001'); // false

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.