Skip to content

Instantly share code, notes, and snippets.

@lorenzoongithub
Created June 30, 2015 20:35
Show Gist options
  • Save lorenzoongithub/3bfaae2ba8d6211cdcf1 to your computer and use it in GitHub Desktop.
Save lorenzoongithub/3bfaae2ba8d6211cdcf1 to your computer and use it in GitHub Desktop.
faker.js
//
// https://github.com/marak/Faker.js/ -
// Generate massive amounts of fake contextual data
//
load('https://cdnjs.cloudflare.com/ajax/libs/Faker/0.7.2/MinFaker.js');
from = new Date(1990, 1,1);
to = new Date(2000, 1,1);
date = Faker.Date.between(from, to);
if (date > from) throw ''
if (date < to) throw ''
email = Faker.Internet.email();
if (email.indexOf('@')==-1) throw ''
if (email.length < 5) throw ''
latitude = Faker.Address.latitude();
if (latitude < -180) throw ''
if (latitude > +180) throw ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment