UNPKG
mens
Version:
latest (0.3.0)
0.3.0
0.2.1
0.2.0
0.1.5
0.1.4
0.1.3
0.1.1
0.1.0
Isomorphic Mithril Javascript Framework (w/ Websockets)
github.com/ezramorse/mens
ezramorse/mens
mens
/
example
/
components
/
content
/
session.js
15 lines
(11 loc)
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module
.
exports
=
function
(
params
) {
this
.
flags
= params.
flags
;
this
.
session
= params.
session
;
this
.
makeHappy
=
function
(
) { m.
socket
.
emit
(
'changeMood'
, {
mood
:
'happy'
}); };
this
.
makeSad
=
function
(
) { m.
socket
.
emit
(
'changeMood'
, {
mood
:
'sad'
}); };
return
this
; };