Based on EventSource polyfill maintained by Yaffle. See it's repository for more information.
In your project path:
$ npm install event-source
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: Browserify, Webmake or Webpack
require('event-source/global');
If native version is already available, above will do nothing (polyfill won't be loaded).
var EventSource = require('event-source');
If native version is available it'll be returned instead of polyfill.
$ npm test