faker.js – Tool To Generate Fake Data For Testing

faker.js is a tool to generate fake data in Node.js and in the browser, it has a lot of different data types to enable you to generate very customised and complete sets of fake or mock data for testing purposes.

It also supports multiple languages and locales and can generate a lot of data types to fit your use case.

Data Types

  • address
  • commerce
  • company
  • database
  • date
  • finance
  • hacker
  • helpers
  • image
  • internet
  • lorem
  • name
  • phone
  • random
  • system

Usage
Browser

<script src = “faker.js” type = “text/javascript”></script>
<script>
var randomName = faker.name.findName(); // Caitlyn Kerluke
var randomEmail = faker.internet.email(); // [email protected]
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
</script>

Node.js

var faker = require(‘faker’);

var randomName = faker.name.findName(); // Rowan Nikolaus
var randomEmail = faker.internet.email(); // [email protected]
var randomCard = faker.helpers.createCard(); // random contact card containing many properties

You can download faker.js here:

faker.js-v4.1.0.zip

Or read more here.

Read the rest of faker.js – Tool To Generate Fake Data For Testing now! Only available at Darknet.

Leave a Reply

Your email address will not be published.