aboutsummaryrefslogtreecommitdiff
path: root/src/definitions
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-04-05 23:35:01 +0200
committerGitHub <[email protected]>2022-04-05 21:35:01 +0000
commitb04dc914eec44ec3c5ae760976b616ce1d2584e1 (patch)
tree258b79f956b2c884c825651fa7c88c12fe215ada /src/definitions
parent6a2d8fce89e0b46f7b9693a7b1f697c108e8af04 (diff)
downloadfaker-b04dc914eec44ec3c5ae760976b616ce1d2584e1.tar.xz
faker-b04dc914eec44ec3c5ae760976b616ce1d2584e1.zip
feat: use street address templates from locales (#754)
Diffstat (limited to 'src/definitions')
-rw-r--r--src/definitions/address.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/definitions/address.ts b/src/definitions/address.ts
index 24f9b7cc..c5d5409f 100644
--- a/src/definitions/address.ts
+++ b/src/definitions/address.ts
@@ -55,6 +55,11 @@ export interface AddressDefinitions {
direction_abbr: string[];
/**
+ * The pattern used to generate building numbers.
+ */
+ building_number: string[];
+
+ /**
* Common street prefixes
*/
street_prefix: string[];
@@ -64,6 +69,20 @@ export interface AddressDefinitions {
street_suffix: string[];
/**
+ * The pattern used to generate street addresses.
+ */
+ street_address: {
+ /**
+ * The fake pattern to generate only the street address.
+ */
+ normal: string;
+ /**
+ * The fake pattern to generate the full street address including the secondary address.
+ */
+ full: string;
+ };
+
+ /**
* The address "inside" an address/e.g. an apartment or office.
*/
secondary_address: string[];
@@ -100,9 +119,12 @@ export const ADDRESS = allOf<keyof AddressDefinitions>()(
'direction_abbr',
'direction',
+ 'building_number',
+
'street_prefix',
'street_suffix',
+ 'street_address',
'secondary_address',
'country_code',