EventSource polyfill as clean NPM module
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.lint
.lintignore
.travis.yml
CHANGES
LICENSE
README.md
global.js
index.js
package.json
polyfill.js

README.md

event-source

EventSource polyfill as clean NPM module

Based on EventSource polyfill maintained by Yaffle. See it's repository for more information.

Installation

NPM

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

Usage

Expose in global scope

require('event-source/global');

If native version is already available, above will do nothing (polyfill won't be loaded).

Load locally

var EventSource = require('event-source');

If native version is available it'll be returned instead of polyfill.

Tests Build Status

$ npm test