1.2.1 • Published 8 years ago

evit v1.2.1

Weekly downloads
3
License
MIT
Repository
-
Last release
8 years ago

Evit

(EV)ent Em(IT)ter

Minimalist event emitters.

Install

npm install evit

Example

If running in node.js environment:

Evit = require("evit");

For browser use:

<script src="evit.js"></script>

In either environment:

Thing = function() {
}

Thing.prototype = new Evit();

t = new Thing();
t.on("foo", function() {
	console.log("foo happens");
});
t.emit("foo");			// prints "foo happens"
t.emit("bar");			// 
t.emit("foo");			// prints "foo happens"
1.2.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago