Skip to content

computationalabstraction/Snuti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Reactive Programming library in Javascript (WIP)

Promises/A+ logo Fantasy Land logo Static Land logo

JavaScript Style Guide


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.

Example Usage

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!")
});

Installation

Currently not hosted (This section is placeholder, will be hosted soon)

Node

npm i snuti

Browser

<script src="https://unpkg.com/snuti"></script>

Browser Optimized (gzipped)

<script src="https://unpkg.com/snuti/dist/browser/snuti.dist.min.js.gz"></script>

Documentation

Complete reference has been given on the official documentation website link given below -

Fantasy Land and Static Land

Snuti implements the following algebraic structures -

About

Reactive Streams for Javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •