Get started with dflow CDN
MIT licensed
Dflow: library for managing asynchronous data flows with functional programming.
Tags:- dataflow
- visual
Stable version
Copied!
How to start using dflow CDN
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.cdnhub.io/dflow/0.43.0/dflow.min.js"></script>
<style>
#app {
width: 100%;
max-width: 500px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id="app">
<input type="text" id="input" value="initial value">
<button id="button">Update Input</button>
</div>
<script>
const { Dag, Flow, Text, Button } = window.dflow;
const input = document.getElementById('input');
const button = document.getElementById('button');
const inputFlow = new Flow({
id: 'inputFlow',
inputs: { input },
outputs: {},
});
const buttonFlow = new Flow({
id: 'buttonFlow',
inputs: { button },
outputs: { value: Text() },
});
const inputToButton = new Dag({
id: 'inputToButton',
inputs: inputFlow.outputs.input,
outputs: buttonFlow.inputs.button,
});
const buttonToInput = new Dag({
id: 'buttonToInput',
inputs: buttonFlow.outputs.value,
outputs: inputFlow.inputs.input,
});
inputToButton.connect(inputToButton.outputs.value, inputFlow.inputs.input);
buttonToInput.connect(buttonToInput.inputs.value, buttonFlow.inputs.button);
inputFlow.run();
buttonFlow.run();
button.addEventListener('click', () => {
buttonFlow.inputs.button.set(Math.random());
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.10.0
0.11.0
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.12.6
0.12.7
0.14.0
0.14.1
0.14.2
0.15.0
0.16.0
0.16.1
0.16.2
0.16.3
0.17.0
0.17.1
0.17.2
0.18.0
0.18.1
0.18.2
0.18.3
0.19.0
0.20.0
0.20.1
0.21.0
0.22.0
0.22.1
0.23.0
0.24.0
0.25.0
0.26.0
0.27.0
0.28.0
0.29.0
0.30.0
0.31.0
0.32.0
0.33.0
0.34.0
0.35.0
0.36.0
0.37.0
0.38.0
0.39.0
0.40.0
0.41.0
0.41.1
0.42.0
*** 0.43.0
0.8.4
0.8.6
0.8.7
0.8.8
0.8.9