M2E
Simple Message to Events plug.
Some APIs are message oriented, like the WebWorker's and WebSocket's API.
I prefer to work with events.
Usage
To create an M2E object, you need to give it a function to send messages, when events are triggered, and there's a hook you're responsible to call when a new message arrives.
Example with webworkers:
// WebWorker
GUI thread:
var worker = 'worker.js?fu_cache=' + +; var m2e = ;worker { m2e; }; var p1 = 'abc' p2 = 'def';m2em2e;
License
MIT