sila_websocket
v0.1.0-rc-3
Published
A Node.js module that abstracts a Web Socket client for consumption in angular apps
Downloads
1
Readme
SiLAWebSockets
A Node.js module that abstracts a Web Socket client for consumption in angular apps.
Installation
npm install sila_websockets --save
yarn add sila_websockets
bower install sila_websockets --save
Important
Angular 6
In angular 6 add the following to polyfills.ts
:
// Add global to window, assigning the value of window itself.
(window as any).global = window;
Usage
Javascript
var websocket = require('sila_websockets');
// var boys = pluralise.getPlural('Boy');
Output should be 'Boys'
TypeScript
import { SiLAWebSockets } from 'sila_websockets';
// console.log(getPlural('Goose'))
Output should be 'Geese'
AMD
define(function(require,exports,module){
var websocket = require('sila_websocket');
});
Test
npm run test
Resources
Acknowledgements:
- https://codeburst.io/https-chidume-nnamdi-com-npm-module-in-typescript-12b3b22f0724
- https://marcobotto.com/blog/compiling-and-bundling-typescript-libraries-with-webpack/