CSP as FRP foundation. Sketches
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
01.consume.broadcast.md
02.tap.md
03.sleep.md
04.drawEvery.callEvery.repeatEvery.md
05.merge.md
06.delay.md
07.lift.md
08.map.filter.scan.md
README.md
dummy.js

README.md

CSP as FRP foundation

Sketches.

Content

01. consume / broadcast

Consume values from input channel. Broadcast values from input channel.

02. tap

Produce side effects from input channel without values being consumed.

03. sleep

Pause task for defined time.

04. drawEvery / callEvery / repeatEvery

Generate sequential values over time.

05. merge

Merge values from input channels into output channel.

06. delay

Delay every value from input channel for defined time.

07. lift

Apply function over input streams. First call will be delayed until all input channels yield.

08. map / filter / scan

Classic functional triad.

Notes

Every time your project is promise-based (async-await is) – don't forget to add something like

// backend only: need condition for isomorphic app
process.on("unhandledRejection", function (reason, p) {
  throw reason;
});

into app root file. Blame NodeJS devs for that.