pipeflow

Develop, Build, Host and Present on a Pipeline

Usage no npm install needed!

<script type="module">
  import pipeflow from 'https://cdn.skypack.dev/pipeflow';
</script>

README

npm version Build Status Coverage Status

Pipeflow

Pipeflow is a free and open source platform to build the next generation of web and mobile apps

Developer Preview

Pipeflow is in Developer Preview and is not ready for production purpose yet.

Installation

To install Pipeflow from node package manager (npm) repository use following command

$ npm install pipeflow

Example

The following example demonstrates how to write a simple app using Pipeflow.

app.js

var pipeflow = require('pipeflow'),
    stream = require('pipeflow-stream'),
    math = require('./math'),
    output = require('./output');

var app = pipeflow(math.sum).pipe(math.percent(30)).pipe(output.log);

app.start(stream.of([20, 30, 50]));

middleware/math.js

exports.sum = function (next, stream) {
  stream.reduce((p, c, cb) => cb((p || 0) + c), next);
};

exports.percent = function (percent) {
  return function (next, stream) {
    next(stream * percent / 100);
  };
};

middleware/output.js

exports.log = function (next, stream) {
  console.log(stream);
  next(stream);
};

Middlewares