0.1.3 • Published 7 years ago

tribble-core v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

tribble-core

Tribble core classes and components based on flow-based programming paradigm.
All classes are written in ES2015 and designed for Node.js runtime (with no dependencies).

Core classes

  • Component for code components defined as a function, a local module (through its path)
  • Connection to link components
  • Graph to describe a set of components and connections forming a network
  • IP for information packets (IP) or chunks of data flowing between components through connections
  • IIPConnection for initial IP connections used to initialize a component with specific parameters
  • Input and Output for components input and output ports

Components

Components can be defined with a function, a local module (through its path) or a remote module (URL)

Function

const core = require('tribble-core');
const component = new core.Component((input, ouput) => {
	const data = input.read();
	Object.assign(data, { newproperty: property });
	ouput.send(data);
});

Local module

const core = require('tribble-core');
const component = new core.Component('./component');

The corresponding component.js should be as follow :

module.exports = (input, ouput) => {
	const data = input.read();
	Object.assign(data, { newproperty: value });
	ouput.send(data);
};
0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago