Skip to content

Commit 66d403f

Browse files
committed
Copy 1.3 to .nextRelease
1 parent e524913 commit 66d403f

112 files changed

Lines changed: 121879 additions & 121905 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/.nextRelease/api.js

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
/*
2-
Use native js dates instead of moment for ~60% increase in dates calculation
3-
Email addresses are now transliterated
4-
More street/city names for NL dataset
5-
Fixed Norwegian id generation bug
6-
Fixed Switzerland phone number format
7-
Add country name to location block
2+
• Use native js dates instead of moment for ~60% increase in dates calculation
3+
• Email addresses are now transliterated
4+
• More street/city names for NL dataset
5+
• Add country name to location block
6+
• Capitalized proper nouns
7+
• Split street into number and name properties
8+
• Fixed Norwegian id generation bug
9+
• Fixed Switzerland phone number format
10+
• Fixed Danish CPR number calculation
811
*/
912

1013
const fs = require('fs');
@@ -145,14 +148,17 @@ class Generator {
145148

146149
let name = this.randomName(this.current.gender, nat);
147150
this.include('name', {
148-
title: this.current.gender === 'male' ? 'mr' : randomItem(this.datasets.common.title),
151+
title: this.current.gender === 'male' ? 'Mr' : randomItem(this.datasets.common.title),
149152
first: name[0],
150153
last: name[1]
151154
});
152155

153156
let timezone = JSON.parse(randomItem(this.datasets.common.timezones));
154157
this.include('location', {
155-
street: range(1, 9999) + ' ' + randomItem(this.datasets[nat].street),
158+
street: {
159+
number: range(1, 9999),
160+
name: randomItem(this.datasets[nat].street)
161+
},
156162
city: randomItem(this.datasets[nat].cities),
157163
state: randomItem(this.datasets[nat].states),
158164
country: this.fullNatName(nat),
@@ -375,22 +381,22 @@ class Generator {
375381

376382
fullNatName(nat) {
377383
let mapping = {
378-
AU: "australia",
379-
BR: "brazil",
380-
CA: "canada",
381-
CH: "switzerland",
382-
DE: "germany",
383-
DK: "denmark",
384-
ES: "spain",
385-
FI: "finland",
386-
FR: "france",
387-
GB: "united kingdom",
388-
IE: "ireland",
389-
IR: "iran",
390-
NL: "netherlands",
391-
NZ: "new zealand",
392-
TR: "turkey",
393-
US: "united states",
384+
AU: "Australia",
385+
BR: "Brazil",
386+
CA: "Canada",
387+
CH: "Switzerland",
388+
DE: "Germany",
389+
DK: "Denmark",
390+
ES: "Spain",
391+
FI: "Finland",
392+
FR: "France",
393+
GB: "United Kingdom",
394+
IE: "Ireland",
395+
IR: "Iran",
396+
NL: "Netherlands",
397+
NZ: "New Zealand",
398+
TR: "Turkey",
399+
US: "United States",
394400
};
395401
return mapping[nat];
396402
}

api/.nextRelease/data/AU/inject.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,5 @@ module.exports = (inc, contents) => {
1313
include(inc, contents, 'picture', pic);
1414
include(inc, contents, 'location', () => {
1515
contents.location.postcode = range(200, 9999); // Override common postcode with AU range
16-
17-
// Override common postcode with AU range
18-
const oldStreet = contents.location.street;
19-
contents.location.street = contents.location.street.replace(/(\d+)/, range(1,9999));
2016
});
2117
};
Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
adelaide
2-
albany
3-
albury
4-
australian capital territory
5-
ballarat
6-
bathurst
7-
bendigo
8-
bowral
9-
brisbane
10-
bunbury
11-
bundaberg
12-
busselton
13-
cairns
14-
coffs harbour
15-
darwin
16-
devonport
17-
dubbo
18-
geelong
19-
geraldton
20-
gladstone
21-
hervey bay
22-
hobart
23-
kalgoorlie
24-
launceston
25-
mackay
26-
maitland
27-
melbourne
28-
mildura
29-
nowra
30-
orange
31-
perth
32-
port macquarie
33-
queanbeyan
34-
rockhampton
35-
shepparton
36-
sunshine coast
37-
sydney
38-
tamworth
39-
toowoomba
40-
townsville
41-
traralgon
42-
tweed
43-
wagga wagga
44-
warragul
45-
warrnambool
46-
wollongong
1+
Adelaide
2+
Albany
3+
Albury
4+
Australian Capital Territory
5+
Ballarat
6+
Bathurst
7+
Bendigo
8+
Bowral
9+
Brisbane
10+
Bunbury
11+
Bundaberg
12+
Busselton
13+
Cairns
14+
Coffs Harbour
15+
Darwin
16+
Devonport
17+
Dubbo
18+
Geelong
19+
Geraldton
20+
Gladstone
21+
Hervey Bay
22+
Hobart
23+
Kalgoorlie
24+
Launceston
25+
Mackay
26+
Maitland
27+
Melbourne
28+
Mildura
29+
Nowra
30+
Orange
31+
Perth
32+
Port Macquarie
33+
Queanbeyan
34+
Rockhampton
35+
Shepparton
36+
Sunshine Coast
37+
Sydney
38+
Tamworth
39+
Toowoomba
40+
Townsville
41+
Traralgon
42+
Tweed
43+
Wagga Wagga
44+
Warragul
45+
Warrnambool
46+
Wollongong

0 commit comments

Comments
 (0)