noflo
Version:
Flow-Based Programming environment for JavaScript
20 lines (18 loc) • 524 B
JavaScript
const noflo = require('../../../../../lib/NoFlo');
module.exports = function (loader, callback) {
loader.registerComponent('example', 'Hello', () => {
const c = new noflo.Component();
c.description = 'Hello stuff';
c.icon = 'bicycle';
c.inPorts.add('in',
{ datatype: 'all' });
c.inPorts.add('out',
{ datatype: 'all' });
c.process = function (input, output) {
const data = input.getData('in');
output.sendDone({ out: data });
};
return c;
});
callback(null);
};