UNPKG

537 Btext/coffeescriptView Raw
1noflo = require 'noflo'
2
3exports.getComponent = ->
4 c = new noflo.Component
5 c.icon = 'expand'
6 c.description = 'This component receives data on a single input port and
7 sends the same data out to all connected output ports'
8
9 c.inPorts.add 'in',
10 datatype: 'all'
11 description: 'Packet to be forwarded'
12
13 c.outPorts.add 'out',
14 datatype: 'all'
15
16 noflo.helpers.WirePattern c,
17 in: 'in'
18 out: 'out'
19 forwardGroups: true
20 async: true
21 , (data, groups, out, callback) ->
22 out.send data
23 do callback
24
25 c