EventSource polyfill as clean NPM module
Based on EventSource polyfill maintained by Yaffle. See it's repository for more information.
In your project path:
$ npm install event-source
You can easily bundle EventSource for browser with modules-webmake
Expose in global scope
If native version is already available, above will do nothing (polyfill won't be loaded).
var EventSource = ;
If native version is available it'll be returned instead of polyfill.
$ npm test