pusher-redux
Advanced tools
Comparing version 0.3.10 to 0.4.0
@@ -5,2 +5,5 @@ 'use strict'; | ||
var DISCONNECTED = 'PUSHER-REDUX/DISCONNECTED'; | ||
var CONNECTING = 'PUSHER-REDUX/CONNECTING'; | ||
var UNAVAILABLE = 'PUSHER-REDUX/UNAVAILABLE'; | ||
var FAILED = 'PUSHER-REDUX/FAILED'; | ||
@@ -63,2 +66,14 @@ // var Pusher = require('pusher-js'); | ||
var connecting = function () { | ||
config.store.dispatch(pusherAction({ actionType: CONNECTING })); | ||
}; | ||
var unavailable = function () { | ||
config.store.dispatch(pusherAction({ actionType: UNAVAILABLE })); | ||
}; | ||
var failed = function () { | ||
config.store.dispatch(pusherAction({ actionType: FAILED })); | ||
}; | ||
var runPending = function () { | ||
@@ -79,2 +94,5 @@ // that's like a promise, but I don't want to depend on promises | ||
config.socket.connection.bind('disconnected', disconnected); | ||
config.socket.connection.bind('connecting', connecting); | ||
config.socket.connection.bind('unavailable', unavailable); | ||
config.socket.connection.bind('failed', failed); | ||
}; | ||
@@ -96,2 +114,5 @@ | ||
config.socket.connection.bind('disconnected', disconnected); | ||
config.socket.connection.bind('connecting', connecting); | ||
config.socket.connection.bind('unavailable', unavailable); | ||
config.socket.connection.bind('failed', failed); | ||
}; | ||
@@ -156,1 +177,4 @@ | ||
module.exports.DISCONNECTED = DISCONNECTED; | ||
module.exports.CONNECTING = CONNECTING; | ||
module.exports.UNAVAILABLE = UNAVAILABLE; | ||
module.exports.FAILED = FAILED; |
{ | ||
"name": "pusher-redux", | ||
"version": "0.3.10", | ||
"version": "0.4.0", | ||
"description": "Integration of Pusher into Redux", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14080
164