UNPKG

2.14 kBJavaScriptView Raw
1'use strict'
2
3const buffer = Buffer.from ||
4 ((input, encoding) => new Buffer(input, encoding))
5
6exports.user = [
7 {
8 id: 1,
9 name: 'John Doe',
10 picture: buffer('deadbeef', 'hex'),
11 createdAt: new Date(Date.UTC(2016, 3, 29)),
12 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
13 birthday: new Date(Date.UTC(1992, 11, 7)),
14 spouse: 2,
15 ownedPets: [ 1 ],
16 friends: [ 3 ]
17 },
18 {
19 id: 2,
20 name: 'Jane Doe',
21 picture: buffer('cafebabe', 'hex'),
22 createdAt: new Date(Date.UTC(2016, 3, 29)),
23 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
24 birthday: new Date(Date.UTC(1997, 6, 30)),
25 spouse: 1,
26 likedAnimal: 1,
27 ownedPets: [ 2, 3 ],
28 friends: [ 3 ],
29 enemies: [ 3 ]
30 },
31 {
32 id: 3,
33 name: 'Microsoft Bob',
34 picture: buffer('babecafe', 'hex'),
35 createdAt: new Date(Date.UTC(2016, 3, 29)),
36 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
37 birthday: new Date(Date.UTC(1995, 3, 10)),
38 nicknames: [ 'Idiot', 'Genius' ],
39 friends: [ 1, 2 ],
40
41 // Hidden denormalized field.
42 '__user_enemies_inverse': [ 2 ]
43 }
44]
45
46exports.animal = [
47 {
48 id: 1,
49 name: 'Babby',
50 type: 'Hamster',
51 nicknames: [ 'Coroham', 'Coron' ],
52 birthday: new Date(Date.UTC(2012, 12, 25)),
53 createdAt: new Date(Date.UTC(2016, 3, 29)),
54 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
55 isNeutered: true,
56 likedBy: 2,
57 owner: 1
58 },
59 {
60 id: 2,
61 name: 'Babbette',
62 type: 'Hamster',
63 birthday: new Date(Date.UTC(2014, 3, 1)),
64 createdAt: new Date(Date.UTC(2016, 3, 29)),
65 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
66 isNeutered: false,
67 owner: 2
68 },
69 {
70 id: 3,
71 name: 'Lappy',
72 type: 'Bunny',
73 birthday: new Date(Date.UTC(2013, 5, 22)),
74 createdAt: new Date(Date.UTC(2016, 3, 29)),
75 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
76 isNeutered: true,
77 owner: 2
78 },
79 {
80 id: '/wtf',
81 name: 'Kantorin',
82 type: 'Bunny',
83 birthday: new Date(Date.UTC(2020, 4, 20)),
84 createdAt: new Date(Date.UTC(2016, 3, 29)),
85 lastModifiedAt: new Date(Date.UTC(2016, 3, 30)),
86 isNeutered: false
87 }
88]