Skip to content

Commit d6c8c3e

Browse files
committed
Made copy of v1.3 for .nextRelease
1 parent 036adfd commit d6c8c3e

25 files changed

Lines changed: 67812 additions & 1977 deletions

File tree

api/.nextRelease/api.js

Lines changed: 357 additions & 287 deletions
Large diffs are not rendered by default.

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', '0' + range(0, 9) + '-' + range(0, 9) + random(3, 3) + '-' + random(3, 4));
6-
include(inc, 'cell', '04' + random(3, 2) + '-' + random(3, 3) + '-' + random(3, 3));
7-
include(inc, 'id', {
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', {
810
name: 'TFN',
911
value: random(3, 9)
1012
});
11-
include(inc, 'picture', pic);
12-
include(inc, 'location', () => {
13+
include(inc, contents, 'picture', pic);
14+
include(inc, contents, 'location', () => {
1315
contents.location.postcode = range(200, 9999); // Override common postcode with AU range
1416

1517
// Override common postcode with AU range
16-
var oldStreet = contents.location.street;
18+
const oldStreet = contents.location.street;
1719
contents.location.street = contents.location.street.replace(/(\d+)/, range(1,9999));
1820
});
1921
};

api/.nextRelease/data/BR/inject.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', '(' + random(3, 2) + ') ' + random(3, 4) + '-' + random(3, 4));
6-
include(inc, 'cell', '(' + random(3, 2) + ') ' + random(3, 4) + '-' + random(3, 4));
7-
include(inc, 'id', {
7+
include(inc, contents, 'phone', '(' + random(3, 2) + ') ' + random(3, 4) + '-' + random(3, 4));
8+
include(inc, contents, 'cell', '(' + random(3, 2) + ') ' + random(3, 4) + '-' + random(3, 4));
9+
include(inc, contents, 'id', {
810
name: '',
911
value: null
1012
});
11-
include(inc, 'picture', pic);
13+
include(inc, contents, 'picture', pic);
1214
};

api/.nextRelease/data/CA/inject.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', random(3, 3) + '-' + random(3, 3) + '-' + random(3, 4));
6-
include(inc, 'cell', random(3, 3) + '-' + random(3, 3) + '-' + random(3, 4));
7-
include(inc, 'id', {
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));
9+
include(inc, contents, 'id', {
810
name: '',
911
value: null
1012
});
11-
include(inc, 'location', () => {
12-
var letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
13-
14-
var postcode = letters[range(0,25)] + random(3, 1) + letters[range(0,25)] + ' ' + random(3, 1) + letters[range(0,25)] + random(3, 1);
15-
16-
contents.location.postcode = postcodes;
13+
include(inc, contents, 'location', () => {
14+
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
15+
const postcodes = letters[range(0,25)] + random(3, 1) + letters[range(0,25)] + ' ' + random(3, 1) + letters[range(0,25)] + random(3, 1);
16+
contents.location.postcode = postcodes;
1717
});
18-
19-
include(inc, 'picture', pic);
20-
};
18+
include(inc, contents, 'picture', pic);
19+
};

api/.nextRelease/data/CH/inject.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'name', () => {
6-
var femaleTitles = ['mademoiselle', 'madame'];
7+
include(inc, contents, 'name', () => {
8+
const femaleTitles = ['mademoiselle', 'madame'];
79
contents.name.title = contents.gender === 'male' ? 'monsieur' : randomItem(femaleTitles);
810
});
911

10-
include(inc, 'location', () => {
12+
include(inc, contents, 'location', () => {
1113
contents.location.postcode = range(1000, 9999);
1214
});
1315

14-
include(inc, 'phone', '(' + random(3, 3) + ')-' + random(3, 3) + '-' + random(3, 4));
15-
include(inc, 'cell', '(' + random(3, 3) + ')-' + random(3, 3) + '-' + random(3, 4));
16-
include(inc, 'id', {
16+
include(inc, contents, 'phone', '(' + random(3, 3) + ')-' + random(3, 3) + '-' + random(3, 4));
17+
include(inc, contents, 'cell', '(' + random(3, 3) + ')-' + random(3, 3) + '-' + random(3, 4));
18+
include(inc, contents, 'id', {
1719
name: 'AVS',
1820
value: '756.' + random(3, 4) + '.' + random(3, 4) + '.' + random(3, 2)
1921
});
20-
include(inc, 'picture', pic);
21-
};
22+
include(inc, contents, 'picture', pic);
23+
};

api/.nextRelease/data/DE/inject.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
const {random, randomItem, pad, range, uppercaseify, include} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', '0' + random(3, 3) + '-' + random(3, 7));
6-
include(inc, 'cell', '017' + random(3, 1) + '-' + random(3, 7));
7-
include(inc, 'id', {
7+
include(inc, contents, 'phone', '0' + random(3, 3) + '-' + random(3, 7));
8+
include(inc, contents, 'cell', '017' + random(3, 1) + '-' + random(3, 7));
9+
include(inc, contents, 'id', {
810
name: '',
911
value: null
1012
});
11-
include(inc, 'location', () => {
12-
var oldStreet = contents.location.street.replace(/(\d+) /, '');
13+
include(inc, contents, 'location', () => {
14+
const oldStreet = contents.location.street.replace(/(\d+) /, '');
1315
contents.location.street = oldStreet + ' ' + range(1, 200);
1416
});
15-
include(inc, 'picture', pic);
16-
};
17+
include(inc, contents, 'picture', pic);
18+
};

api/.nextRelease/data/DK/inject.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', random(3, 8));
6-
include(inc, 'cell', random(3, 8));
7-
include(inc, 'id', {
7+
include(inc, contents, 'phone', random(3, 8));
8+
include(inc, contents, 'cell', random(3, 8));
9+
include(inc, contents, 'id', {
810
name: 'CPR',
911
value: random(3, 6) + '-' + random(3, 4)
1012
});
11-
include(inc, 'picture', pic);
13+
include(inc, contents, 'picture', pic);
1214
};

api/.nextRelease/data/DK/lists/cities.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aaborg øst
1+
aaborg øst
22
aalborg s.ø.
33
aarhus
44
aarhus n

api/.nextRelease/data/ES/inject.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', '9' + random(3, 2) + '-' + random(3, 3) + '-' + random(3, 3));
6-
include(inc, 'cell', '6' + random(3, 2) + '-' + random(3, 3) + '-' + random(3, 3));
7-
include(inc, 'id', {
7+
include(inc, contents, 'phone', '9' + random(3, 2) + '-' + random(3, 3) + '-' + random(3, 3));
8+
include(inc, contents, 'cell', '6' + random(3, 2) + '-' + random(3, 3) + '-' + random(3, 3));
9+
include(inc, contents, 'id', {
810
name: 'DNI',
911
value: random(3, 8) + '-' + random(4, 1)
1012
});
11-
include(inc, 'picture', pic);
13+
include(inc, contents, 'picture', pic);
1214
};

api/.nextRelease/data/FI/inject.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
2+
13
module.exports = (inc, contents) => {
2-
var pic = contents.picture;
4+
const pic = contents.picture;
35
delete contents.picture;
46

5-
include(inc, 'phone', '0' + range(2, 9) + '-' + random(3, 3) + '-' + random(3, 3));
6-
include(inc, 'cell', '04' + range(0, 9) + '-' + random(3, 3) + '-' + random(3, 2) + '-' + random(3, 2));
7-
include(inc, 'id', () => {
8-
var dob = contents.dob;
9-
var dobDate = new Date(dob);
10-
var full_year = dobDate.getFullYear();
7+
include(inc, contents, 'phone', '0' + range(2, 9) + '-' + random(3, 3) + '-' + random(3, 3));
8+
include(inc, contents, 'cell', '04' + range(0, 9) + '-' + random(3, 3) + '-' + random(3, 2) + '-' + random(3, 2));
9+
include(inc, contents, 'id', () => {
10+
const dob = contents.dob;
11+
const dobDate = new Date(dob);
12+
const full_year = dobDate.getFullYear();
1113

12-
var day = dobDate.getDay();
13-
var month = dobDate.getMonth();
14-
var year = String(full_year).substr(2, 2);
14+
const day = dobDate.getDay();
15+
const month = dobDate.getMonth();
16+
const year = String(full_year).substr(2, 2);
1517

16-
var century;
18+
let century;
1719
if (full_year < 1900) {
1820
century = '+';
1921
} else if (full_year >= 1900 && full_year < 2000) {
@@ -22,18 +24,18 @@ module.exports = (inc, contents) => {
2224
century = 'A';
2325
}
2426

25-
var zzz = random(3, 2) + (contents.gender !== 'male' ? randomItem([0, 2, 4, 6, 8]) : randomItem([1, 3, 5, 7, 9]));
26-
var checksum_str = '0123456789ABCDEFHJKLMNPRSTUVWXY';
27+
const zzz = random(3, 2) + (contents.gender !== 'male' ? randomItem([0, 2, 4, 6, 8]) : randomItem([1, 3, 5, 7, 9]));
28+
const checksum_str = '0123456789ABCDEFHJKLMNPRSTUVWXY';
2729

28-
var cc = checksum_str[(day + month + year + zzz) % 31];
30+
const cc = checksum_str[(day + month + year + zzz) % 31];
2931

30-
var hetu = day + month + year + century + zzz + cc;
32+
const hetu = day + month + year + century + zzz + cc;
3133

3234
contents.id = {
3335
name: 'HETU',
3436
value: hetu
3537
};
3638
});
3739

38-
include(inc, 'picture', pic);
39-
};
40+
include(inc, contents, 'picture', pic);
41+
};

0 commit comments

Comments
 (0)