Skip to content

Commit

Permalink
es6-ified, #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kapusta committed May 2, 2017
1 parent fcbaa0e commit f8b3c2d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/js/factories/sckt.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function(angular){
'use strict';

/**
@name sckt
Expand All @@ -12,7 +11,7 @@

var sockets = {};

var connect = function(url) {
var connect = url => {
var b64 = window.btoa(url);
if (sockets[b64]) {
sockets[b64].connections++;
Expand All @@ -27,7 +26,7 @@
}
};

var disconnect = function(url) {
var disconnect = url => {
var b64 = window.btoa(url);
if (sockets[b64]) {
sockets[b64].connections--;
Expand All @@ -40,8 +39,8 @@
};

return {
'connect': connect,
'disconnect': disconnect
connect,
disconnect
};

});
Expand Down

0 comments on commit f8b3c2d

Please sign in to comment.