Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagofleal/small-rxjs
Small implementation of rxjs
https://github.com/thiagofleal/small-rxjs
Last synced: about 1 month ago
JSON representation
Small implementation of rxjs
- Host: GitHub
- URL: https://github.com/thiagofleal/small-rxjs
- Owner: thiagofleal
- License: mit
- Created: 2023-05-14T19:52:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-15T02:26:31.000Z (about 1 year ago)
- Last Synced: 2023-10-16T06:27:14.061Z (about 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# small-rxjs
Small implementation of rxjs (Reactive Extension for JavaScript).### Implementations
- Subscription
- Observable
- Subject
- BehaviorSubject
- ReplaySubject
- AsyncSubject
- operators
- map
- filter
- first
- of
- from
- interval
- fromEvents
- fromEvent
- fromEventSource
- timeout
- keepAlive
- retry### Add small-rxjs
* #### Using UGDM (https://github.com/thiagofleal/ugdm)
```sh
ugdm add small-rxjs --link https://github.com/thiagofleal/small-rxjs -v master
```
* #### Using GIT
```sh
git clone https://github.com/thiagofleal/small-rxjs
```### Using small-rxjs
*small-rxjs* classes must be imported in a **module** script (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules).
##### Examples:
```js
import { Observable } from "../vendor/small-rxjs/rx.js";const obs$ = new Observable(observer => {
observer.next(10);
});obs$.subscribe(console.log);
```
```js
import { of, filter, map } from "../vendor/small-rxjs/rx.js";of(1, 2, 3, 4)
.pipe(filter(e => e % 2), map(e => e * 2))
.subscribe(console.log);
```