How to use the fake function from faker

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

53
54
55
56
57
58
59
60
61
62
var initialize_member = get_members.then(function(members) {
    if (members[socket.id]) {
        return members[socket.id];
    }

    var username = faker.fake("{{name.firstName}} {{name.lastName}}");
    var member = {
        socket: socket.id,
        username: username,
        avatar: "//api.adorable.io/avatars/30/" + username + '.png'
fork icon72
star icon149
watch icon60

31
32
33
34
35
36
37
38
39
40
  }) {
    let user = { username: username.substr(-20), email, password };
    let article = {
      title: faker.lorem.words(),
      description: faker.lorem.sentences(),
      body: faker.fake(`![{{lorem.words}}]({{image.city}})

> {{lorem.sentence}}

-----
fork icon0
star icon0
watch icon1