How to use the hacker function from faker

Find comprehensive JavaScript faker.hacker code examples handpicked from public code repositorys.

230
231
232
233
234
235
236
237
238
239
const faker = require('faker');

module.exports = () => ({
  messages: [...Array(3)].map((value, index) => ({
    id: index + 1,
    name: faker.hacker.noun(),
    status: faker.hacker.adjective(),
    description: faker.hacker.phrase(),
  })),
});
fork icon40
star icon54
watch icon43

+ 5 other calls in file

87
88
89
90
91
92
93
94
95
96
// Update the user
user = await fetch(`${config.env.apiUrl}/user`, {
  method: 'PUT',
  body: JSON.stringify({
    user: {
      bio: faker.hacker.phrase(),
      image: faker.image.avatar(),
    },
  }),
  headers: {
fork icon0
star icon0
watch icon1

7
8
9
10
11
12
13
14
15
16
  const reason = reasons[Math.floor(Math.random() * reasons.length)];
  const adj = faker.company.bsAdjective();
  const noun = faker.company.catchPhraseNoun();
  return `${reason} ${adj} ${noun}`;
})
.join(', ') + ', too ' + faker.hacker.adjective()

return {
  id: `${minionIdCounter++}`,
  name: faker.name.findName(),
fork icon0
star icon0
watch icon0

+ 3 other calls in file

215
216
217
218
219
220
221
222
223
224

for (let i = 0; i < Math.floor(Math.random() * 5) + 1; i++) {
  attachments.push(faker.image.business());
}

let title = faker.hacker.phrase();

let job = new Job({
  client: _.sample(client)._id,
  title: title,
fork icon0
star icon0
watch icon0