@fragaria/address-formatter
Advanced tools
Comparing version 2.9.0 to 3.0.0
@@ -1,8 +0,84 @@ | ||
export function format(input: object, options?: { | ||
abbreviate: boolean; | ||
appendCountry: boolean; | ||
cleanupPostcode: boolean; | ||
countryCode: string; | ||
fallbackCountryCode: string; | ||
output: 'string' | 'array'; | ||
}): string | string[]; | ||
type PrimaryInputTypes = | ||
| 'archipelago' | ||
| 'city' | ||
| 'continent' | ||
| 'country' | ||
| 'countryCode' | ||
| 'county' | ||
| 'hamlet' | ||
| 'house' | ||
| 'houseNumber' | ||
| 'island' | ||
| 'municipality' | ||
| 'neighbourhood' | ||
| 'postalCity' | ||
| 'postcode' | ||
| 'region' | ||
| 'road' | ||
| 'state' | ||
| 'stateDistrict' | ||
| 'village'; | ||
type AliasInputTypes = | ||
| 'allotments' | ||
| 'borough' | ||
| 'building' | ||
| 'cityBlock' | ||
| 'cityDistrict' | ||
| 'commercial' | ||
| 'countryName' | ||
| 'countyCode' | ||
| 'croft' | ||
| 'department' | ||
| 'district' | ||
| 'farmland' | ||
| 'footway' | ||
| 'housenumber' | ||
| 'houses' | ||
| 'industrial' | ||
| 'isolatedDwelling' | ||
| 'localAdministrativeArea' | ||
| 'locality' | ||
| 'partialPostcode' | ||
| 'path' | ||
| 'pedestrian' | ||
| 'place' | ||
| 'postcode' | ||
| 'province' | ||
| 'publicBuilding' | ||
| 'quarter' | ||
| 'residential' | ||
| 'roadReference' | ||
| 'roadReferenceIntl' | ||
| 'square' | ||
| 'stateCode' | ||
| 'street' | ||
| 'streetName' | ||
| 'streetNumber' | ||
| 'subcounty' | ||
| 'subdistrict' | ||
| 'subdivision' | ||
| 'suburb' | ||
| 'town' | ||
| 'township' | ||
| 'ward'; | ||
type Input = Partial<Record<PrimaryInputTypes | AliasInputTypes, string>>; | ||
interface CommonOptions { | ||
abbreviate?: boolean; | ||
appendCountry?: boolean; | ||
cleanupPostcode?: boolean; | ||
countryCode?: string; | ||
fallbackCountryCode?: string; | ||
} | ||
export function format( | ||
input: Input, | ||
options?: CommonOptions & {output?: 'string'}, | ||
): string; | ||
export function format( | ||
input: Input, | ||
options: CommonOptions & {output: 'array'}, | ||
): string[]; |
{ | ||
"name": "@fragaria/address-formatter", | ||
"version": "2.9.0", | ||
"version": "3.0.0", | ||
"description": "Universal international address formatting in Javascript", | ||
@@ -18,2 +18,3 @@ "main": "dist/cjs/address-formatter.js", | ||
"prepare-templates": "node management/prepare-templates.js", | ||
"collect-aliases": "node management/collect-aliases.js", | ||
"build": "rollup -c rollup.config.js" | ||
@@ -20,0 +21,0 @@ }, |
1099775
37451