noflo-core
Version:
NoFlo Essentials
32 lines (23 loc) • 719 B
text/coffeescript
noflo = require 'noflo'
owl = require 'owl-deepcopy'
# noflo-nodejs
class Copy extends noflo.Component
description: 'deep (i.e. recursively) copy an object'
icon: 'copy'
constructor: ->
= new noflo.InPorts
in:
datatype: 'all'
description: 'Packet to be copied'
= new noflo.OutPorts
out:
datatype: 'all'
.in.on 'begingroup', (group) =>
.out.beginGroup group
.in.on 'data', (data) =>
.out.send owl.deepCopy data
.in.on 'endgroup', =>
.out.endGroup()
.in.on 'disconnect', =>
.out.disconnect()
exports.getComponent = -> new Copy