Skip to content

Commit

Permalink
Release v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hph committed Dec 1, 2016
1 parent 034e8dd commit dd421ef
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 52 deletions.
40 changes: 29 additions & 11 deletions dist/node/pusher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v3.2.4
* Pusher JavaScript Library v4.0.0
* http://pusher.com/
*
* Copyright 2016, Pusher
Expand Down Expand Up @@ -180,16 +180,24 @@ module.exports =
this.timelineSenderTimer = null;
}
};
Pusher.prototype.bind = function (event_name, callback) {
this.global_emitter.bind(event_name, callback);
Pusher.prototype.bind = function (event_name, callback, context) {
this.global_emitter.bind(event_name, callback, context);
return this;
};
Pusher.prototype.unbind = function (event_name, callback) {
this.global_emitter.unbind(event_name, callback);
Pusher.prototype.unbind = function (event_name, callback, context) {
this.global_emitter.unbind(event_name, callback, context);
return this;
};
Pusher.prototype.bind_all = function (callback) {
this.global_emitter.bind_all(callback);
Pusher.prototype.bind_global = function (callback) {
this.global_emitter.bind_global(callback);
return this;
};
Pusher.prototype.unbind_global = function (callback) {
this.global_emitter.unbind_global(callback);
return this;
};
Pusher.prototype.unbind_all = function (callback) {
this.global_emitter.unbind_all();
return this;
};
Pusher.prototype.subscribeAll = function () {
Expand Down Expand Up @@ -816,7 +824,7 @@ module.exports =

"use strict";
var Defaults = {
VERSION: "3.2.4",
VERSION: "4.0.0",
PROTOCOL: 7,
host: 'ws.pusherapp.com',
ws_port: 80,
Expand Down Expand Up @@ -1028,6 +1036,7 @@ module.exports =
/***/ function(module, exports, __webpack_require__) {

"use strict";
var Collections = __webpack_require__(4);
var callback_registry_1 = __webpack_require__(15);
var Dispatcher = (function () {
function Dispatcher(failThrough) {
Expand All @@ -1039,16 +1048,25 @@ module.exports =
this.callbacks.add(eventName, callback, context);
return this;
};
Dispatcher.prototype.bind_all = function (callback) {
Dispatcher.prototype.bind_global = function (callback) {
this.global_callbacks.push(callback);
return this;
};
Dispatcher.prototype.unbind = function (eventName, callback, context) {
this.callbacks.remove(eventName, callback, context);
return this;
};
Dispatcher.prototype.unbind_all = function (eventName, callback) {
this.callbacks.remove(eventName, callback);
Dispatcher.prototype.unbind_global = function (callback) {
if (!callback) {
this.global_callbacks = [];
return this;
}
this.global_callbacks = Collections.filter(this.global_callbacks || [], function (c) { return c !== callback; });
return this;
};
Dispatcher.prototype.unbind_all = function () {
this.unbind();
this.unbind_global();
return this;
};
Dispatcher.prototype.emit = function (eventName, data) {
Expand Down
40 changes: 29 additions & 11 deletions dist/react-native/pusher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v3.2.4
* Pusher JavaScript Library v4.0.0
* http://pusher.com/
*
* Copyright 2016, Pusher
Expand Down Expand Up @@ -180,16 +180,24 @@ module.exports =
this.timelineSenderTimer = null;
}
};
Pusher.prototype.bind = function (event_name, callback) {
this.global_emitter.bind(event_name, callback);
Pusher.prototype.bind = function (event_name, callback, context) {
this.global_emitter.bind(event_name, callback, context);
return this;
};
Pusher.prototype.unbind = function (event_name, callback) {
this.global_emitter.unbind(event_name, callback);
Pusher.prototype.unbind = function (event_name, callback, context) {
this.global_emitter.unbind(event_name, callback, context);
return this;
};
Pusher.prototype.bind_all = function (callback) {
this.global_emitter.bind_all(callback);
Pusher.prototype.bind_global = function (callback) {
this.global_emitter.bind_global(callback);
return this;
};
Pusher.prototype.unbind_global = function (callback) {
this.global_emitter.unbind_global(callback);
return this;
};
Pusher.prototype.unbind_all = function (callback) {
this.global_emitter.unbind_all();
return this;
};
Pusher.prototype.subscribeAll = function () {
Expand Down Expand Up @@ -814,7 +822,7 @@ module.exports =

"use strict";
var Defaults = {
VERSION: "3.2.4",
VERSION: "4.0.0",
PROTOCOL: 7,
host: 'ws.pusherapp.com',
ws_port: 80,
Expand Down Expand Up @@ -1026,6 +1034,7 @@ module.exports =
/***/ function(module, exports, __webpack_require__) {

"use strict";
var Collections = __webpack_require__(4);
var callback_registry_1 = __webpack_require__(15);
var Dispatcher = (function () {
function Dispatcher(failThrough) {
Expand All @@ -1037,16 +1046,25 @@ module.exports =
this.callbacks.add(eventName, callback, context);
return this;
};
Dispatcher.prototype.bind_all = function (callback) {
Dispatcher.prototype.bind_global = function (callback) {
this.global_callbacks.push(callback);
return this;
};
Dispatcher.prototype.unbind = function (eventName, callback, context) {
this.callbacks.remove(eventName, callback, context);
return this;
};
Dispatcher.prototype.unbind_all = function (eventName, callback) {
this.callbacks.remove(eventName, callback);
Dispatcher.prototype.unbind_global = function (callback) {
if (!callback) {
this.global_callbacks = [];
return this;
}
this.global_callbacks = Collections.filter(this.global_callbacks || [], function (c) { return c !== callback; });
return this;
};
Dispatcher.prototype.unbind_all = function () {
this.unbind();
this.unbind_global();
return this;
};
Dispatcher.prototype.emit = function (eventName, data) {
Expand Down
40 changes: 29 additions & 11 deletions dist/web/pusher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v3.2.4
* Pusher JavaScript Library v4.0.0
* http://pusher.com/
*
* Copyright 2016, Pusher
Expand Down Expand Up @@ -189,16 +189,24 @@ return /******/ (function(modules) { // webpackBootstrap
this.timelineSenderTimer = null;
}
};
Pusher.prototype.bind = function (event_name, callback) {
this.global_emitter.bind(event_name, callback);
Pusher.prototype.bind = function (event_name, callback, context) {
this.global_emitter.bind(event_name, callback, context);
return this;
};
Pusher.prototype.unbind = function (event_name, callback) {
this.global_emitter.unbind(event_name, callback);
Pusher.prototype.unbind = function (event_name, callback, context) {
this.global_emitter.unbind(event_name, callback, context);
return this;
};
Pusher.prototype.bind_all = function (callback) {
this.global_emitter.bind_all(callback);
Pusher.prototype.bind_global = function (callback) {
this.global_emitter.bind_global(callback);
return this;
};
Pusher.prototype.unbind_global = function (callback) {
this.global_emitter.unbind_global(callback);
return this;
};
Pusher.prototype.unbind_all = function (callback) {
this.global_emitter.unbind_all();
return this;
};
Pusher.prototype.subscribeAll = function () {
Expand Down Expand Up @@ -463,7 +471,7 @@ return /******/ (function(modules) { // webpackBootstrap

"use strict";
var Defaults = {
VERSION: "3.2.4",
VERSION: "4.0.0",
PROTOCOL: 7,
host: 'ws.pusherapp.com',
ws_port: 80,
Expand Down Expand Up @@ -1495,6 +1503,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports, __webpack_require__) {

"use strict";
var Collections = __webpack_require__(9);
var callback_registry_1 = __webpack_require__(24);
var Dispatcher = (function () {
function Dispatcher(failThrough) {
Expand All @@ -1506,16 +1515,25 @@ return /******/ (function(modules) { // webpackBootstrap
this.callbacks.add(eventName, callback, context);
return this;
};
Dispatcher.prototype.bind_all = function (callback) {
Dispatcher.prototype.bind_global = function (callback) {
this.global_callbacks.push(callback);
return this;
};
Dispatcher.prototype.unbind = function (eventName, callback, context) {
this.callbacks.remove(eventName, callback, context);
return this;
};
Dispatcher.prototype.unbind_all = function (eventName, callback) {
this.callbacks.remove(eventName, callback);
Dispatcher.prototype.unbind_global = function (callback) {
if (!callback) {
this.global_callbacks = [];
return this;
}
this.global_callbacks = Collections.filter(this.global_callbacks || [], function (c) { return c !== callback; });
return this;
};
Dispatcher.prototype.unbind_all = function () {
this.unbind();
this.unbind_global();
return this;
};
Dispatcher.prototype.emit = function (eventName, data) {
Expand Down
6 changes: 3 additions & 3 deletions dist/web/pusher.min.js

Large diffs are not rendered by default.

40 changes: 29 additions & 11 deletions dist/worker/pusher.worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v3.2.4
* Pusher JavaScript Library v4.0.0
* http://pusher.com/
*
* Copyright 2016, Pusher
Expand Down Expand Up @@ -180,16 +180,24 @@ var Pusher =
this.timelineSenderTimer = null;
}
};
Pusher.prototype.bind = function (event_name, callback) {
this.global_emitter.bind(event_name, callback);
Pusher.prototype.bind = function (event_name, callback, context) {
this.global_emitter.bind(event_name, callback, context);
return this;
};
Pusher.prototype.unbind = function (event_name, callback) {
this.global_emitter.unbind(event_name, callback);
Pusher.prototype.unbind = function (event_name, callback, context) {
this.global_emitter.unbind(event_name, callback, context);
return this;
};
Pusher.prototype.bind_all = function (callback) {
this.global_emitter.bind_all(callback);
Pusher.prototype.bind_global = function (callback) {
this.global_emitter.bind_global(callback);
return this;
};
Pusher.prototype.unbind_global = function (callback) {
this.global_emitter.unbind_global(callback);
return this;
};
Pusher.prototype.unbind_all = function (callback) {
this.global_emitter.unbind_all();
return this;
};
Pusher.prototype.subscribeAll = function () {
Expand Down Expand Up @@ -814,7 +822,7 @@ var Pusher =

"use strict";
var Defaults = {
VERSION: "3.2.4",
VERSION: "4.0.0",
PROTOCOL: 7,
host: 'ws.pusherapp.com',
ws_port: 80,
Expand Down Expand Up @@ -1026,6 +1034,7 @@ var Pusher =
/***/ function(module, exports, __webpack_require__) {

"use strict";
var Collections = __webpack_require__(4);
var callback_registry_1 = __webpack_require__(15);
var Dispatcher = (function () {
function Dispatcher(failThrough) {
Expand All @@ -1037,16 +1046,25 @@ var Pusher =
this.callbacks.add(eventName, callback, context);
return this;
};
Dispatcher.prototype.bind_all = function (callback) {
Dispatcher.prototype.bind_global = function (callback) {
this.global_callbacks.push(callback);
return this;
};
Dispatcher.prototype.unbind = function (eventName, callback, context) {
this.callbacks.remove(eventName, callback, context);
return this;
};
Dispatcher.prototype.unbind_all = function (eventName, callback) {
this.callbacks.remove(eventName, callback);
Dispatcher.prototype.unbind_global = function (callback) {
if (!callback) {
this.global_callbacks = [];
return this;
}
this.global_callbacks = Collections.filter(this.global_callbacks || [], function (c) { return c !== callback; });
return this;
};
Dispatcher.prototype.unbind_all = function () {
this.unbind();
this.unbind_global();
return this;
};
Dispatcher.prototype.emit = function (eventName, data) {
Expand Down
6 changes: 3 additions & 3 deletions dist/worker/pusher.worker.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pusher-js",
"version": "3.2.4",
"description": "Pusher JavaScript library for browser, React Native, NodeJS and web workers",
"version": "4.0.0",
"description": "Pusher JavaScript library for browsers, React Native, NodeJS and web workers",
"main": "dist/web/pusher.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit dd421ef

Please sign in to comment.