lib/emitter/off.js
function resolveContext (emitter, context, storageKey) {
  // TODO: clean up - try to use internal context resolve more on no
  // use the one from on (resolve)
  // figure out why we cant use resolveContextSet since thats what it is
  if (context) {
    // this is lame stuff! should be in observable in some way...
    let base = emitter.parent.parent
    let type = emitter.key
    let setObj = { on: {} }
    setObj.on[type] = {}
    // base = base.set(setObj) // .on[type]
    emitter = (base.set(setObj) || base)._on[type]
  }
  if (!emitter.hasOwnProperty(storageKey)) {
    emitter.setKey(storageKey, {}, false)
  }
  return emitter
}
function resolveContext (emitter, context, storageKey) {
  // TODO: clean up - try to use internal context resolve more on no
  // use the one from on (resolve)
  // figure out why we cant use resolveContextSet since thats what it is
  if (context) {
    // this is lame stuff! should be in observable in some way...
    let base = emitter.parent.parent
    let type = emitter.key
    let setObj = { on: {} }
    setObj.on[type] = {}
    // base = base.set(setObj) // .on[type]
    emitter = (base.set(setObj) || base)._on[type]
  }
  if (!emitter.hasOwnProperty(storageKey)) {
    emitter.setKey(storageKey, {}, false)
  }
  return emitter
}
function resolveContext ( emitter , context , storageKey ) { // TODO: clean up - try to use internal context resolve more on no // use the one from on (resolve) // figure out why we cant use resolveContextSet since thats what it is if ( context ) { // this is lame stuff! should be in observable in some way... let base = emitter . parent . parent let type = emitter . key let setObj = { on : { } } setObj . on [ type ] = { } // base = base.set(setObj) // .on[type] emitter = ( base . set ( setObj ) || base ) . _on [ type ] } if ( ! emitter . hasOwnProperty ( storageKey ) ) { emitter . setKey ( storageKey , { } , false ) } return emitter }
can become a lot faster rly a lot...
can become a lot faster rly a lot ...