-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.js
33 lines (29 loc) · 840 Bytes
/
utils.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
class Utils {
getUUID() {
var firstPart = (Math.random() * 46656) | 0;
var secondPart = (Math.random() * 46656) | 0;
firstPart = ("000" + firstPart.toString(36)).slice(-3);
secondPart = ("000" + secondPart.toString(36)).slice(-3);
return firstPart + secondPart;
}
generateGlobalHardCodedData() {
global.users = [{
"name": "Zohair",
"uid": 1,
"online": false, messages: []
}, {
"name": "Tushar",
"uid": 2,
"online": false, messages: []
}, {
"name": "Shubham",
"uid": 3,
"online": false, messages: []
}, {
"name": "Samrudhi",
"uid": 4,
"online": false, messages: []
}];
}
}
module.exports = Utils;