Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Add aliases for some functions #35

Merged
merged 1 commit into from Nov 1, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions EventEmitter.js
Expand Up @@ -95,6 +95,7 @@
// Return the instance of EventEmitter to allow chaining
return this;
};
proto.on = proto.addListener;

/**
* Removes a listener function from the specified event.
Expand Down Expand Up @@ -123,6 +124,7 @@
// Return the instance of EventEmitter to allow chaining
return this;
};
proto.off = proto.removeListener;

/**
* Adds listeners in bulk using the manipulateListeners method.
Expand Down Expand Up @@ -259,6 +261,7 @@
// Return the instance of EventEmitter to allow chaining
return this;
};
proto.trigger = proto.emitEvent;

// Expose the class either via AMD or the global object
if(typeof define === 'function' && define.amd) {
Expand Down