-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnect.js
43 lines (43 loc) · 875 Bytes
/
connect.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
34
35
36
37
38
39
40
41
42
43
module.exports = {
name: "connect",
ns: "socket.io-client",
description: "Creates an io socket client object",
phrases: {
active: "Creating socket io client"
},
ports: {
input: {
url: {
type: "string",
format: "uri",
title: "Url",
description: "The URL to listen on.",
required: true
}
},
output: {
socket: {
type: "function",
title: "io socket client object"
}
}
},
dependencies: {
npm: {
"socket.io-client": "##socket.io-client##"
}
},
fn: function connect(input, $, output, state, done, cb, on, socket_io_client) {
var r = function() {
output = {
socket: $.create(socket_io_client.connect($.url))
}
}.call(this);
return {
output: output,
state: state,
on: on,
return: r
};
}
}