Skip to content

Commit 036adfd

Browse files
committed
Add API v1.3
- Use native js dates instead of moment for ~60% increase in dates calculation - Email addresses are now transliterated - More street/city names for NL dataset - Fixed Norwegian id generation bug
1 parent 0a572e8 commit 036adfd

140 files changed

Lines changed: 137002 additions & 0 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/1.3/api.js

Lines changed: 433 additions & 0 deletions
Large diffs are not rendered by default.

api/1.3/data/AU/inject.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
3+
module.exports = (inc, contents) => {
4+
const pic = contents.picture;
5+
delete contents.picture;
6+
7+
include(inc, contents, 'phone', '0' + range(0, 9) + '-' + range(0, 9) + random(3, 3) + '-' + random(3, 4));
8+
include(inc, contents, 'cell', '04' + random(3, 2) + '-' + random(3, 3) + '-' + random(3, 3));
9+
include(inc, contents, 'id', {
10+
name: 'TFN',
11+
value: random(3, 9)
12+
});
13+
include(inc, contents, 'picture', pic);
14+
include(inc, contents, 'location', () => {
15+
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));
20+
});
21+
};

api/1.3/data/AU/lists/cities.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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

0 commit comments

Comments
 (0)