forked from Nanyte25/merge_conflict_test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_file.js
48 lines (48 loc) · 1.54 KB
/
test_file.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
'repeat(5, 10)': {
_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")}}',
name: {
first: '{{firstName()}}',
last: '{{surname()}}'
},
company: '{{company().toUpperCase()}}',
email: function (tags) {
// Email tag is deprecated, because now you can produce an email as simple as this:
return (this.name.first + '.' + this.name.last + '@' + this.company + tags.domainZone()).toLowerCase();
},
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)}}',
tags: [
{
'repeat(5)': '{{lorem(1, "words")}}'
}
],
range: range(10),
friends: [
{
'repeat(3)': {
id: '{{index()}}',
name: '{{firstName()}} {{surname()}}'
}
}
],
greeting: function (tags) {
return 'Hello, ' + this.name.first + '! You have ' + tags.integer(5, 10) + ' unread messages.';
},
favoriteFruit: function (tags) {
var fruits = ['apple', 'banana', 'strawberry'];
return fruits[tags.integer(0, fruits.length - 1)];
}
}
}