-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path79-censor-pii.js
44 lines (43 loc) · 1.23 KB
/
79-censor-pii.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Censor all the personal identifiable information for a list of candidates.
function censorPII(candidates) {
}
console.log(censorPII({
name: 'Raisa',
gender: 'female',
companiesLessThanAYear: ['Google'],
companiesLessThanThreeYears: ['Microsoft', 'Apple'],
companiesLessThanSixYears: [],
companiesLongerThanSixYearsAgo: ['Riot Games'],
phoneNumber: '0733 333 333',
email: '[email protected]',
}, {
name: 'Ron',
gender: 'male',
companiesLessThanAYear: ['Zoom'],
companiesLessThanThreeYears: ['Youtube'],
companiesLessThanSixYears: ['Epic Games'],
companiesLongerThanSixYearsAgo: [],
phoneNumber: '0744 444 444',
email: '[email protected]',
}))
/* Expected output:
[{
name: 'Xxxx',
gender: 'xxx',
companiesLessThanAYear: ['Google'],
companiesLessThanThreeYears: ['Microsoft', 'Apple'],
companiesLessThanSixYears: [],
companiesLongerThanSixYearsAgo: ['Riot Games'],
phoneNumber: '(xxxx) xxx-xxx',
email: '[email protected]',
}, {
name: 'Xxxx',
gender: 'xxx',
companiesLessThanAYear: ['Zoom'],
companiesLessThanThreeYears: ['Youtube'],
companiesLessThanSixYears: ['Epic Games'],
companiesLongerThanSixYearsAgo: [],
phoneNumber: '(xxxx) xxx-xxx',
email: '[email protected]',
}]
*/