Skip to content

Instantly share code, notes, and snippets.

@lifesinger
Created December 25, 2013 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifesinger/8121026 to your computer and use it in GitHub Desktop.
Save lifesinger/8121026 to your computer and use it in GitHub Desktop.
[
'{{repeat(5, 7)}}',
{
id: '{{index}}',
guid: '{{guid}}',
isActive: '{{bool}}',
balance: '{{numeric(1000,4000,%=$0,0.00)}}',
picture: 'http://placehold.it/32x32',
age: '{{numeric(20,40)}}',
name: '{{firstName}} {{surname}}',
gender: '{{gender}}',
company: '{{company}}',
email: '{{email}}',
phone: '+1 {{phone}}',
address: '{{numeric(100,999)}} {{street}}, {{city}}, {{state}}, {{numeric(100,10000)}}',
about: '{{lorem(1,paragraphs)}}',
registered: '{{date(YYYY-MM-ddThh:mm:ss Z)}}',
latitude: '{{numeric(-90.000001, 90)}}',
longitude: '{{numeric(-180.000001, 180)}}',
tags: [
'{{repeat(7)}}',
'{{lorem(1)}}'
],
friends: [
'{{repeat(3)}}',
{
id: '{{index}}',
name: '{{firstName}} {{surname}}'
}
],
randomArrayItem: function(idx) {
var choices = ['cherry', 'apple', 'lemon'];
return choices[this.numeric(0, choices.length - 1)];
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment