1.0.9 • Published 6 years ago

datafake v1.0.9

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

DataFake

DataFake is a JSON library that generates fake data for you. This is great for front-end developers who do not want to deal with back-end

DataFake is heavily inspired by Faker's Faker.

Table of Contents

Installation

npm install datafake

Basic Usage

Use new DataFake() to create and initialize some fake data, which can generate data by accessing properties named after the type of data you want.

// require DataFake
var DataFake = require('datafake');

// use the factory to create a Faker\Generator instance
var data = new DataFake();

// generate data by accessing functions
console.log(data.randomDigit());
  // 5;
console.log(data.randomNumber(3));
  // 344 of length '3'
console.log(data.shuffle([1,2,3]));
 // [3,1,2]
1.0.9

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago