Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 651 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 651 Bytes

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