0.1.0 • Published 4 months ago
@joakimstai/dataflow v0.1.0
Dataflow
Based on tiny-reactive-dataflow, which was inspired by topologica. For now, see tiny-reactive-dataflow for a thorough explanation on how it works.
This is a work in progress. Roadmap:
- Tests
- Benchmarks
- Documentation file
- Support redefinition of functions?
Examples
Create dataflow
const dataflow = new Dataflow({ out: (x, y) => x + y })
const dataflow = new Dataflow()
dataflow.define({ out: (x, y) => x + y })
define
is the same as register
in tiny-reactive-dataflow.
Set values
await dataflow.set({ x: 1, y: 2 });
Get values
await dataflow.get('out') // 3
To access all resulting values:
dataflow.values // { x: 1, y: 2, out: 3 }
0.1.0
4 months ago