-
Added "use strict"
-
Converted to CommonJS module
-
Module is a constructor that can be used with class inheritence
-
Removed very minor dependencies on underscore.js and Backbone.js
a. Added static Events.mixin function to replace Backbone mixin functionality
b. Underscore was only used for slice, just using the native method
-
Completely removed listenTo(), listenToOnce(), and stopListening() methods
-
Change eventsApi() to accept an array of event names
-
Change eventsApi() to receive function references instead of "action" strings
a. This is a micro optimization and allows better obfuscation
-
trigger() no longer calls eventsApi(), this is a very rare (and mostly unnecessary) use case that can be avoided
a. Optimization is important when triggering, but convenience is important when adding and removing
-
With trigger not using eventsApi(), it allowed further optimizations on eventsApi() and trigger()
a. Removed ctx property from _events[name] object, just use context property instead
b. Fixed lint errors in the process
-
Added aStart argument to triggerEvents() as a logical slice removing slice call for most cases