-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy pathinject.js
More file actions
23 lines (20 loc) · 905 Bytes
/
inject.js
File metadata and controls
23 lines (20 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const {random, randomItem, pad, range, uppercaseify, include,} = require('../../api');
module.exports = (inc, contents) => {
const pic = contents.picture;
delete contents.picture;
let phone = '(' + random(4, 1) + random(3, 2) + ') ' + random(4, 1) + random(3, 2) + '-' + random(3, 4);
let cell = '(' + random(4, 1) + random(3, 2) + ') ' + random(4, 1) + random(3, 2) + '-' + random(3, 4);
let annualIncome = range(1000, 10000000);
let nonTaxableIncome = range(0, annualIncome - 1);
include(inc, contents, 'phone', phone);
include(inc, contents, 'cell', cell);
include(inc, contents, 'id', {
name: 'SSN',
value: random(3, 3) + '-' + random(3, 2) + '-' + random(3, 4)
});
include(inc, contents, 'income', {
annualIncome: annualIncome,
nonTaxableIncome: nonTaxableIncome
})
include(inc, contents, 'picture', pic);
};