Skip to content

Commit e48850a

Browse files
authored
Merge pull request #146 from RobinWPollard/master
Changed Phone, GSM and Postcode to follow the Dutch standards
2 parents bb950da + 7e24395 commit e48850a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

api/1.3/data/NL/inject.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@ module.exports = (inc, contents) => {
44
const pic = contents.picture;
55
delete contents.picture;
66

7-
include(inc, contents, 'phone', '(' + random(3, 3) + ')-' + random(3, 3) + '-' + random(3, 4));
8-
include(inc, contents, 'cell', '(' + random(3, 3) + ')-' + random(3, 3) + '-' + random(3, 4));
7+
include(inc, contents, 'phone', () => {
8+
const phones = [
9+
'(0' + random(3, 2) + ') ' + random(3, 7),
10+
'(0' + random(3, 3) + ') ' + random(3, 6)
11+
];
12+
contents.phone = randomItem(phones);
13+
});
14+
include(inc, contents, 'cell', '(06) ' + random(3, 8));
915
include(inc, contents, 'id', {
1016
name: 'BSN',
1117
value: random(3, 8)
1218
});
19+
include(inc, contents, 'location', () => {
20+
const code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
21+
contents.location.postcode = random(3, 4) + ' ' + code[range(0, 25)] + code[range(0, 25)];
22+
});
1323
include(inc, contents, 'picture', pic);
14-
};
24+
};

0 commit comments

Comments
 (0)