CodeNewbie Community

Discussion on: April 22nd, 2021: What did you learn this week?

Collapse
nickytonline profile image
Nick Taylor Author • Edited on

Awesome!

Hacker man from Kung Fury putting on a Nintendo Power glove

I wonder if it uses faker.js under the hood. 🤔

GitHub logo Marak / faker.js

generate massive amounts of realistic fake data in Node.js and the browser

faker.js - generate massive amounts of fake data in the browser and node.js

Faker.js

Build Status Coverage Status

npm version

OpenCollective OpenCollective Gitter chat

Demo

rawgit.com/Marak/faker.js/master/e...

Faker Cloud

Don't have a local development setup ready?

Try our hosted version of Faker at fakercloud.com/api

github.com/faker/faker-cloud

Usage

Browser

    <script src = "faker.js" type = "text/javascript"></script>
    <script>
      var randomName = faker.name.findName(); // Caitlyn Kerluke
      var randomEmail = faker.internet.email(); // Rusty@arne.info
      var randomCard = faker.helpers.createCard(); // random contact card containing many properties
    </script>
Enter fullscreen mode Exit fullscreen mode

Node.js

    var faker = require('faker');
    var randomName = faker.name.findName(); // Rowan Nikolaus
    var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
    var randomCard = faker.helpers.createCard
Enter fullscreen mode Exit fullscreen mode
Collapse
r002 profile image
Robert Lin

This is cool; I didn't know about faker.js! Thanks for sharing! 🙏