Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 482 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 482 Bytes

galvo

Acts as a "higher order stream" which manages a collection of stuff with a single "active" item. You might use it to coordinate a slideshow.

Implemented using Kefir.js.

Installation

yarn add @standard-library/galvo

Usage

const items = ["a", "b", "c"];
const advance = K.interval(3000).take(3);
const slideshow = galvo({ advance }, items);

slideshow.current.log();
// => a---b---c---a
slideshow.previous.log();
// => ----a---b---c