pubx

0.0.3 • Public • Published

pubx

Really simple pub/sub state management 📋

TBD

This is still tbd. But, this is currently used in VaporBoy, and WasmBoy

Description

A State management sytem based around passing events through pub/sub. Meant to be easy, and lightweight.

State will be a JSON object, where the state object keys are an json object. e.g publish('myKey', newKeyState) => this.state.myKey = newKeyState

state objects will have two properties:

value: The current value of the state

subscribers: Json object keyed by random subscriber Ids, that are equal to the callbacks assigned to them

Package Sidebar

Install

npm i pubx

Weekly Downloads

0

Version

0.0.3

License

Apache-2.0

Unpacked Size

24 kB

Total Files

7

Last publish

Collaborators

  • torch2424