npm.io
0.0.4 • Published 2 years ago

@dgaa/store-subject

Licence
MIT
Version
0.0.4
Deps
0
Size
3 kB
Vulns
0
Weekly
0

store-subject

Building

Run nx build store-subject to build the library.

Running unit tests

Run nx test store-subject to execute the unit tests via Jest.

Usage

import { StoreSubject } from '@dgaa/store-subject';

const storeSubject = new StoreSubject(1);

storeSubject.subscribe((currentValue) => {
  console.log(currentValue); // 1
);

storeSubject.next(2); // Will log 2

storeSubject.getValue(); // Will return 2

Keywords