Reference · Parsing, formatting and shared types
cleanAddressDetailedfunction
Tidies an address like cleanAddress, and says what it changed.
Import it
import { cleanAddressDetailed } from "@johnmorrisdotca/address-plus";
Definition
function cleanAddressDetailed(addressString: string, options?: CleanAddressOptions): CleanAddressResult
Parameters
| Name | Type | Description |
|---|---|---|
addressString | string | The address as typed. |
options (optional) | CleanAddressOptions | What to tidy and the letter case to set (see |
Returns
CleanAddressResult
The tidied address, the input, whether anything changed, and a line for each change.
Examples
import { cleanAddressDetailed } from "@johnmorrisdotca/address-plus";
console.log(cleanAddressDetailed("742 evergreen terrace,springfield , il 62704").cleanedAddress);
// → "742 Evergreen Ter, Springfield IL 62704"742 Evergreen Ter, Springfield IL 62704What it prints (run when this page was built)