Skip to content

Instantly share code, notes, and snippets.

View jeroencoumans's full-sized avatar

Jeroen Coumans jeroencoumans

View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
(function() {
function MicroEvent() {}
var slice = Array.prototype.slice;
MicroEvent.prototype = {
on: function(event, fct){
this._events = this._events || {};
this._events[event] = this._events[event] || [];
this._events[event].push(fct);