 
 eventric = require 'eventric'
 _ = eventric 'HelperUnderscore'
+
+array = []
+slice = array.slice
 
 Events = MixinEvents =
 

    self = this
    once = _.once(->
      self.off name, once
      callback.apply this, arguments_
      return
    )
    once._callback = callback

  # receive the true name of the event as the first argument).
  trigger: (name) ->
    return this  unless @_events
    args = slice.call(arguments, 1)
    return this  unless eventsApi(this, "trigger", name, args)
    events = @_events[name]
    allEvents = @_events.all
    triggerEvents events, args  if events
    triggerEvents allEvents, arguments  if allEvents
    this


