summaryrefslogtreecommitdiff
path: root/scripts/socket/message.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/socket/message.js')
-rw-r--r--scripts/socket/message.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/socket/message.js b/scripts/socket/message.js
index 044027d..0288cbc 100644
--- a/scripts/socket/message.js
+++ b/scripts/socket/message.js
@@ -1,18 +1,18 @@
'use strict';
class Message{
- constructor (type, data)
- {
- this.t = type;
- this.d = data;
- }
+ constructor (type, data)
+ {
+ this.t = type;
+ this.d = data;
+ }
- stringify ()
- {
- var dat = this.d
- if(typeof dat !== "string"){
- dat = JSON.stringify(dat);
- }
- return JSON.stringify({type: this.t, data: dat});
- }
+ stringify ()
+ {
+ var dat = this.d
+ if(typeof dat !== "string"){
+ dat = JSON.stringify(dat);
+ }
+ return JSON.stringify({type: this.t, data: dat});
+ }
}