Use the same WebSocket client code in a browser or Node.js for isomorphic apps
npm install universal-websocket-clientUses the native WebSocket client code in a browser and the ws package client on Node.js, enabling isomorphic applications to use WebSockets. Keeps your browser build slim, by not including any of the Node WebSocket implementation.
Installation
============
```
npm install --save universal-websocket-client
Usage
=====
`
var WebSocket = require('universal-websocket-client');
\\ ... use the WebSocket client interface.
`
On the client side, you'll now need to use browserify (or Webpack or something similar) to bundle your code.
See tests/browser and tests/node
Run Tests
=========
These are end-to-end tests, that test the installed the package.
Node
----
``
cd tests/browser/
npm install
npm test
Browser
-------
``
cd tests/node/
npm install
npm test
Then visit http://localhost:8000`