# rxjs-lite

> Lightweight reactive extensions for modern JavaScript

Latest version **1.0.5** (published 2022-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install rxjs-lite
pnpm add rxjs-lite
yarn add rxjs-lite
bun add rxjs-lite
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-10-23 |
| First published | 2022-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael Pintos |
| Maintainers | machester4 |
| Keywords | Rx, RxJS, RxJS-Lite, ReactiveX, ReactiveExtensions, Observables, Observable, Observer, Subscription, ES6, ES2015 |

## Links

- npm: https://www.npmjs.com/package/rxjs-lite
- Repository: https://github.com/machester4/rxjs-lite
- Issues: https://github.com/machester4/rxjs-lite/issues
- npm.io page: https://npm.io/package/rxjs-lite

## Recent versions

- 1.0.5 (latest) — 2022-10-23
- 1.0.3 — 2022-10-23
- 1.0.2 — 2022-10-23

## README

# Lightweight reactive extensions for modern JavaScript (rxjs-lite)

[![npm package](https://img.shields.io/badge/npm%20-rxjs--lite-brightgreen)](https://www.npmjs.com/package/rxjs-lite) [![version number](https://img.shields.io/npm/v/rxjs-lite?color=green&label=version)](https://github.com/machester4/rxjs-lite/releases) [![Actions Status](https://github.com/machester4/rxjs-lite/workflows/Test/badge.svg)](https://github.com/machester4/rxjs-lite/actions) [![License](https://img.shields.io/github/license/machester4/rxjs-lite)](https://github.com/machester4/rxjs-lite/blob/main/LICENSE)

### sample code

```typescript
import { Observable } from '@machester4/rxjs-lite'

class ChatModelObservable extends Observable {
  private messages: string[] = []

  constructor() {
    super()
  }

  sendMessage(userID: number, message: string) {
    this.messages.push(message)
    this._next({ userID, message })
  }
}

type ChatMessageDto = {
  userID: number
  message: string
}

const testObservable = new ChatModelObservable()
const subscriptionA = testObservable.subscribe<ChatMessageDto>((message) =>
  console.log('message received subscription A: ', message)
)
const subscriptionB = testObservable.subscribe<ChatMessageDto>((message) =>
  console.log('message received subscription B: ', message)
)

testObservable.sendMessage(1, 'Hello')

subscriptionA.unsubscribe()

testObservable.sendMessage(2, 'World')
```

---
_Source: https://npm.io/package/rxjs-lite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
