Skip to content

Instantly share code, notes, and snippets.

@lastlegion
Last active December 4, 2016 02:10
Show Gist options
  • Save lastlegion/c6b42eaeeb61b89f603f2e21727bead0 to your computer and use it in GitHub Desktop.
Save lastlegion/c6b42eaeeb61b89f603f2e21727bead0 to your computer and use it in GitHub Desktop.
json generator
{
_id: '{{objectId()}}',
index: '{{index()}}',
guid: '{{guid()}}',
isActive: '{{bool()}}',
balance: '{{floating(1000, 4000, 2, "$0,0.00")}}',
picture: 'http://placehold.it/32x32',
age: '{{integer(20, 40)}}',
eyeColor: '{{random("blue", "brown", "green")}}',
company: '{{company().toUpperCase()}}',
group: '{{integer(0,15)}}',
mutation_count: '{{integer(0,1000)}}',
disease_months: '{{integer(0,200)}}',
phone: '+1 {{phone()}}',
address: '{{integer(100, 999)}} {{street()}}, {{city()}}, {{state()}}, {{integer(100, 10000)}}',
about: '{{lorem(1, "paragraphs")}}',
registered: '{{moment(this.date(new Date(2014, 0, 1), new Date())).format("LLLL")}}',
latitude: '{{floating(-90.000001, 90)}}',
longitude: '{{floating(-180.000001, 180)}}',
timestamp: '{{date(new Date(2014, 0, 1), new Date()).getTime()}}'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment