Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-websocket

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-websocket - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

17

angular-websocket.js

@@ -44,4 +44,4 @@ ;(function(module, undefined) {

states: ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'],
on: function(event) {
return addListener(event);
on: function(event, callback) {
return addListener(event)(callback);
},

@@ -75,3 +75,4 @@ onmessage: addListener('message'),

args = Array.prototype.slice.call(arguments);
return ws.removeListener.apply(ws, args);
ws.removeEventListener.apply(ws, args);
return this;
},

@@ -92,11 +93,13 @@

events.forEach(function(eventName) {
var prefixed = _prefix + eventName;
var forwardEvent = asyncAngularify(function (data) {
scope.$broadcast(prefixed, data);
var prefixedEvent = _prefix + eventName;
var forwardEvent = asyncAngularify(function(data) {
scope.$broadcast(prefixedEvent, data);
});
scope.$on('$destroy', function () {
ws.removeListener(eventName, forwardEvent);
ws.removeEventListener(eventName, forwardEvent);
});
ws.onmessage(eventName, forwardEvent);
});
return this;
}

@@ -103,0 +106,0 @@ };

{
"name": "angular-websocket",
"version": "0.0.4",
"version": "0.0.5",
"homepage": "https://github.com/gdi2290/angular-websocket",

@@ -5,0 +5,0 @@ "authors": [

{
"name": "angular-websocket",
"version": "0.0.4",
"version": "0.0.5",
"main": "angular-websocket.js",

@@ -5,0 +5,0 @@ "description": "WebSocket service for Angular.js",

@@ -17,3 +17,3 @@ # angular-websocket [![Build Status](https://travis-ci.org/gdi2290/angular-websocket.png?branch=master)](https://travis-ci.org/gdi2290/angular-websocket)

````html
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular.min.js"></script>
<script src="app/bower_components/angular-websocket/angular-websocket.js"></script>

@@ -36,2 +36,3 @@ <script>

console.log('connection');
WebSocket.send('message')
});

@@ -38,0 +39,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc