@northtech/ratatosk
v2.4.0-rc.1
Published
ratatosk ======== _... scampers along Yggdrasil to carry messages and gossip between Nidhug at the roots and the eagle perched in the branches._
Downloads
96
Readme
ratatosk
... scampers along Yggdrasil to carry messages and gossip between Nidhug at the roots and the eagle perched in the branches.
This library contains a few specialized but useful features using RxJs to pass information.
BroadcastingSet
The BroadcastingSet maintains a set of objects with IDs, and exposes Observables signaling changes to the elements in the set.
Observable store
An object which emits its data (or subsets of it) as each field is set or changed. This can be used to maintain
application state or configuration.
(This tastes a little Redux-y, but is implemented more as a utility library leveraging RxJs than as a framework).
Url fragment
Functionality to manipulate the URL hash fragment, treating it as a key/value store and getting information about
changes to it.
An example of use is maintaining map position and zoom level in an OpenLayers application this way, allowing users to
deep-link to a specific position.
Recently Used list
Keeps track of most recently used items, accorting to when they are "touched".
Usage
Install with
npm install @northtech/ratatosk@^2.1
Install peer dependency if needed:
npm install rxjs@^7
TypeDocs at https://doc.northtech.dk/ratatosk/