@tobes31415/basic-observables
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Basic-Observables

A lightweight implementation of the observable pattern.

This is meant to cover many of the common needs so that you don't always need to reach for larger libraries at the start. The syntax is compatible with a particularly well know asynchrounous event library, so when your application grows to the point you need all those extra features you can seamlessly transition without having to rewrite your code, just change your imports.

View API Docs

Installation

npm install --save @tobes31415/basic-observables

Basic Useage

import { subject } from "@tobes31415/basic-observables";

const event = new Subject<number>();
event.subscribe(value => console.log("The event happened", value));

event.next(123);
// "The event happened", 123

Thank you

Big thank you to Macadamian Technologies for donating time towards this open source project :-)

Package Sidebar

Install

npm i @tobes31415/basic-observables

Weekly Downloads

130

Version

2.0.1

License

MIT

Unpacked Size

20.2 kB

Total Files

20

Last publish

Collaborators

  • tobes31415