
Snuti is a fast comprehensive reactive programming library inspired by RxJS, Bacon.js and most.js. It is conforming to the ES Observable proposal, Promise/A+ spec, Fantasy Land and Static Land. It is crossplatform, lightweight with no dependancies and reliable.
let { Observable, AsyncScheduler } = require("snuti")
let o1 = new Observable((observer) => {
for (let i = 0; i < 10; i++) {
setTimeout(() => observer.next(i), i * 100);
}
setTimeout(() => observer.complete(), 1000);
}).notifyThrough(new AsyncScheduler());
o1.pipe(map(v => v + 5)).subscribe({
next: (v) => console.log(v),
complete: () => console.log("Stream Ends!")
});
Currently not hosted (This section is placeholder, will be hosted soon)
npm i snuti
<script src="https://unpkg.com/snuti"></script>
<script src="https://unpkg.com/snuti/dist/browser/snuti.dist.min.js.gz"></script>
Complete reference has been given on the official documentation website link given below -
Snuti implements the following algebraic structures -