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

angular-phoenix

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-phoenix - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

bower.json
{
"name": "angular-phoenix",
"version": "0.1.0",
"version": "0.1.1",
"authors": [

@@ -5,0 +5,0 @@ "MikaAK <mikakalathil@gmail.com>"

@@ -10,8 +10,17 @@ "use strict";

this.$get = ["$rootScope", "PhoenixBase", function ($rootScope, PhoenixBase) {
var socket = new PhoenixBase.Socket(urlBase),
this.$get = ["$rootScope", "$window", "PhoenixBase", function ($rootScope, $window, PhoenixBase) {
var createSocketUrl = function createSocketUrl(url) {
var loc = $window.location,
socketProtocol = loc.protocol === "http:" ? "ws:" : "wss:",
baseUrl = url.startsWith("/") ? url.substr(1, url.length) : url;
return "" + socketProtocol + "//" + loc.host + "" + loc.pathname + "" + baseUrl;
};
var socketUrl = urlBase.search("ws") === 0 ? urlBase : createSocketUrl(urlBase),
socket = new PhoenixBase.Socket(urlBase),
channels = new Map();
return {
phoenix: PhoenixBase,
base: PhoenixBase,
socket: socket,

@@ -18,0 +27,0 @@ leave: function leave(name) {

{
"name": "angular-phoenix",
"version": "0.1.0",
"version": "0.1.1",
"description": "Native bindings for phoenix in angular",

@@ -5,0 +5,0 @@ "main": "dist/angular-phoenix.js",

@@ -14,3 +14,3 @@ Angular Phoenix

**__Note:__** You must have the original `phoenix.js` loaded prior to this
**__Note:__** You must have the original `phoenix.js` loaded prior to this, it also makes use of promises so please have a promise library loaded or be using ES6!

@@ -17,0 +17,0 @@ ### How to use

@@ -10,4 +10,13 @@ 'use strict'

this.$get = ['$rootScope', 'PhoenixBase', ($rootScope, PhoenixBase) => {
var socket = new PhoenixBase.Socket(urlBase),
this.$get = ['$rootScope', '$window', 'PhoenixBase', ($rootScope, $window, PhoenixBase) => {
var createSocketUrl = function(url) {
var loc = $window.location,
socketProtocol = loc.protocol === 'http:' ? 'ws:' : 'wss:',
baseUrl = url.startsWith('/') ? url.substr(1, url.length) : url
return `${socketProtocol}//${loc.host}${loc.pathname}${baseUrl}`
}
var socketUrl = urlBase.search('ws') === 0 ? urlBase : createSocketUrl(urlBase),
socket = new PhoenixBase.Socket(urlBase),
channels = new Map()

@@ -14,0 +23,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