println json objects too :)
This commit is contained in:
parent
66d46eab32
commit
3f2e11a41d
7
index.js
7
index.js
@ -336,14 +336,17 @@ var form = {
|
||||
}
|
||||
|
||||
, println: function (rrs, ws, msg) {
|
||||
return ws.write((msg||'') + '\n');
|
||||
if ('string' !== typeof msg) {
|
||||
msg = JSON.stringify(msg);
|
||||
}
|
||||
return ws.write(msg + '\n');
|
||||
}
|
||||
};
|
||||
|
||||
var inputs = {
|
||||
text: {
|
||||
onReturnAsync: function (rrs, ws, str) {
|
||||
return;
|
||||
return str;
|
||||
}
|
||||
}
|
||||
, email: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user