How to use the year function from chance

Find comprehensive JavaScript chance.year code examples handpicked from public code repositorys.

14
15
16
17
18
19
20
21
22
23
24
25


// Generate fake information
let firstname = faker.name.firstName();
let surname = faker.name.lastName();
let gender = 1; // 1: Female, 2: Male
let year = chance.year({ min: 1996, max: 1998 });
let dob = chance.birthday({ year: year });


nightmare
    .useragent(ua)
fork icon4
star icon5
watch icon0

121
122
123
124
125
126
127
128
129
130
price: chance.floating({
    fixed: 2,
    max: 1000,
    min: 0
}),
year: chance.year(),
artist: auth,
downloads: chance.d20(),
cap: 1000,
genre: genre,
fork icon1
star icon1
watch icon0