Ensure an object to have the needed _events property
@param  {*} obj
@param  {String} name
542385
function ensureEvents(obj, name) {
  obj._events = obj._events || {};
  obj._events[name] = obj._events[name] || [];
}
482449
function(object, events, callback) {
      var listeners = this._listeners || (this._listeners = {});
      var id = object._listenerId || (object._listenerId = _.uniqueId('l'));
      listeners[id] = object;
      object.on(events, callback || this, this);
      return this;
    }
1025098
function(name, params) {
		var event = new CustomEvent(name, {detail: params});
		this.dispatchEvent(event);
		return event;
	}
579368
function(obj, propName)
{
	if (obj instanceof conbo.EventDispatcher)
	{
		var options = {property:propName, value:obj[propName]};
		
		obj.dispatchEvent(new conbo.ConboEvent('change:'+propName, options));
		obj.dispatchEvent(new conbo.ConboEvent('change', options));
	}
}
774077
function(events, name, callback, context) {
  // Remove all callbacks for all events.
  if (!events || !name && !context && !callback) return;

  var names = name ? [name] : _.keys(events);
  for (var i = 0, length = names.length; i < length; i++) {
    name = names[i];
    var handlers = events[name];

    // Bail out if there are no events stored.
    if (!handlers) break;

    // Find any remaining events.
    var remaining = [];
    if (callback || context) {
      for (var j = 0, k = handlers.length; j < k; j++) {
        var handler = handlers[j];
        if (
          callback && callback !== handler.callback &&
            callback !== handler.callback._callback ||
              context && context !== handler.context
        ) {
          remaining.push(handler);
        }
      }
    }

    // Replace events if there are any remaining.  Otherwise, clean up.
    if (remaining.length) {
      events[name] = remaining;
    } else {
      delete events[name];
    }
  }
  if (!_.isEmpty(events)) return events;
}
1203427
function resolveEvents(oEvents) {
			if ( oEvents != null && typeof oEvents === 'object' ) {
				for ( var sName in oEvents ) {
					resolveRef(oEvents, sName);
				}
			}
		}
344348
function(element, name) {
		var event = this.document.createEvent("UIEvents");
		event.initEvent(name, true, true);
		return element.dispatchEvent(event);
	}
1209693
function (obj) {
            // Must be an Object.
            // Because of IE, we also have to check the presence of the constructor property.
            // Make sure that Dom nodes and window objects don't pass through, as well
            if (!obj || S.type(obj) !== "object" || obj.nodeType || obj.window == obj) {
                return FALSE;
            }

            var key, objConstructor;

            try {
                // Not own constructor property must be Object
                if ((objConstructor = obj.constructor) && !hasOwnProperty(obj, "constructor") && !hasOwnProperty(objConstructor.prototype, "isPrototypeOf")) {
                    return FALSE;
                }
            } catch (e) {
                // IE8,9 Will throw exceptions on certain host objects
                return FALSE;
            }

            // Own properties are enumerated firstly, so to speed up,
            // if last one is own, then all properties are own.


            for (key in obj) {
            }

            return key === undefined || hasOwnProperty(obj, key);
        }
786732
function (name, meta, target) {
            if (!__define.defineEvent(target || this.prototype, name, meta)) {
                this._events_.push(name);
            }

            return this;
        }
1899
function(name) {
                        this._checkObject(name);

                        if (!this._hasObject([name])) {
                            this._setObject([name], this._getObjectCreator([name]).call())._removeObjectCreator([name]);
                        }
                        return this._getObject([name]);
                    }
559150
function(name, callback, scope, once) {

            var events = null;
            if (!(events = this._events[name])) {
                events = this._events[name] = [];
            }

            events.push({
                callback: callback,
                scope: scope || this,
                once: once,
                fired: false
            });

            return callback;

        }
1077249
function(name, obj) {
  var parts = name.split('.');
  if (parts.length > 1) {
    var curProperty = parts.shift();
    return obj[curProperty] ? getProperty(parts.join('.'), obj[curProperty]) : undefined;
  }
  else
    return obj[name];
}
8537
function(name, desc){
        this.assert(
            this.obj.hasOwnProperty(name)
            , function(){ return 'expected ' + this.inspect + ' to have own property ' + i(name) + (desc ? " | " + desc : "") }
            , function(){ return 'expected ' + this.inspect + ' to not have own property ' + i(name) + (desc ? " | " + desc : "") });
        this.obj = this.obj[name];
        return this;
    }
142190
function(event, name) {

            var eventListeners = this.__getEventListeners(event);

            if (!(name in eventListeners)) {
                throw new Error('Event listener for event "' + event + '" with name "' + name + '" does not exist!');
            }

            return eventListeners[event][name];
        }
1295370
function watchedEvents(obj) {
  var listeners = meta(obj, false).listeners, ret = [];

  if (listeners) {
    for(var eventName in listeners) {
      if (!SKIP_PROPERTIES[eventName] && listeners[eventName]) {
        ret.push(eventName);
      }
    }
  }
  return ret;
}
155716
function addEvent(obj, evt, func){
    var a;

    // Sensible browsers use `addEventListener`
    if((a = obj.addEventListener)){
      a.call(obj, evt, func, false);

    // IE uses `attachEvent`
    }else{
      obj.attachEvent('on' + evt, func);
    }
  }
921460
function validateProperties(object, name, required, optional) {
    // validates object properties exist or not
    var properties = _.keys(object);
    var missing = _.difference(required, properties);
    var extra = _.difference(properties, required, optional);
    var errorOrNull = null;
    if (missing.length) {
        errorOrNull = new VError("%s is missing required properties (%j)",
                               name, missing);
        errorOrNull.missing = missing;
        errorOrNull.required = required;
        errorOrNull.object = object;
    } else if (extra.length) {
        errorOrNull = new VError("%s has extra (unexpected) properties (%j)",
                               name, extra);
        errorOrNull.extra = extra;
        errorOrNull.required = required;
        errorOrNull.optional = optional;
        errorOrNull.object = object;
    }
    return errorOrNull;
}