oculus

1.1.0 • Public • Published

oculus oculus

oculus is a tool to simplify object transition, and communication of state (pub/sub pattern) through the use of named objects (unique id)

cold = new StateVal('cold','ooze',{})

// funky subscribes to changes in cold object
funky = new StateVal('funky', { 'cold': cold} )

// update and publish cold state to its listeners
cold.publish({ val: 'medina' })
{ status: 'PageElement.published(obj).and.updatedSelf',
  obj: 
   StateVal {
     name: 'cold',
     subscribers: { '#funky': [PageElement] },
     val: 'medina' } }

license: BSD

/oculus/

    Package Sidebar

    Install

    npm i oculus

    Weekly Downloads

    13

    Version

    1.1.0

    License

    BSD

    Unpacked Size

    31.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • victusfate