isKnownBrazilianPostcodefunction
Whether a CEP is in a range the Correios gave a state: it has the shape and its first five digits fall in a state's range. This says nothing of whether the CEP itself is in use; there is no list of them here.
Import it
import { isKnownBrazilianPostcode } from "@johnmorrisdotca/address-plus/br";
Definition
function isKnownBrazilianPostcode(postcode: string): boolean
Parameters
| Name | Type | Description |
|---|---|---|
postcode | string | The CEP. |
Returns
boolean
true when a state's range holds it.
Examples
import { isKnownBrazilianPostcode } from "@johnmorrisdotca/address-plus/br";
console.log(["01310-200", "00999-000", "01310"].map(isKnownBrazilianPostcode));
// → [true,false,false][ true, false, false ]What it prints (run when this page was built)