laravel-echo
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -11,2 +11,21 @@ 'use strict'; | ||
var EchoEventFormatter = function () { | ||
function EchoEventFormatter() { | ||
_classCallCheck(this, EchoEventFormatter); | ||
} | ||
_createClass(EchoEventFormatter, null, [{ | ||
key: 'format', | ||
/** | ||
* Format the given event name. | ||
*/ | ||
value: function format(event) { | ||
return event.replace(/\./g, '\\'); | ||
} | ||
}]); | ||
return EchoEventFormatter; | ||
}(); | ||
var PusherConnector = function () { | ||
@@ -108,3 +127,3 @@ function PusherConnector() { | ||
value: function on(event, callback) { | ||
this.channel.bind(event.replace(/\./g, '\\'), callback); | ||
this.channel.bind(EchoEventFormatter.format(event), callback); | ||
@@ -192,3 +211,3 @@ return this; | ||
this.channel.bind(event.replace(/\./g, '\\'), function (data) { | ||
this.channel.bind(EchoEventFormatter.format(event), function (data) { | ||
callback(data, _this4.channel); | ||
@@ -195,0 +214,0 @@ }); |
{ | ||
"name": "laravel-echo", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Laravel Echo library for beautiful Pusher integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/echo.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
5
0
6
9111
215