Skip to content

A simple TypeScript library for dealing with reactive implementations of essential data structures.

License

Notifications You must be signed in to change notification settings

muhammetaliakbay/reactive-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reactive-Library · Build Status GitHub npm (scoped)

Reactive-Library is a TypeScript library for dealing with reactive implementations of essential data structures.

Installation

Use your favorite package manager to add @muhammetaliakbay/reactive-library as your dependency.

npm install @muhammetaliakbay/reactive-library --save

API Documents (TypeDoc)

Find detailed api documentations here https://reactive-library.muhammetaliakbay.com/.

ReactiveSet

Example

import {ReactiveSet} from '@muhammetaliakbay/reactive-library';

const set = new ReactiveSet<string>()

set.add$.subscribe(
    element => console.log(`${element} added to the set`)
);
set.remove$.subscribe(
    element => console.log(`${element} removed from set`)
);

set.add('My'); // adds 'My'
set.add('Home'); // and 'Home'
set.add('Sweet'); // and 'Sweet' for only one time
set.add('Home'); // do NOT adds 'Home' twice while it has 'Home' already (as a ideal set)

set.remove('My'); // simply removes 'My' from set (if it in the set)

// Console Outputs:
//   My added to the set
//   Home added to the set
//   Sweet added to the set
//   My removed from set

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU GPLv3

About

A simple TypeScript library for dealing with reactive implementations of essential data structures.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published