Skip to content

Commit 51ef0cc

Browse files
committed
🚨 Fix linter errors
1 parent da7857c commit 51ef0cc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

‎index.js‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,65 +26,65 @@ module.exports = RedisPubSub;
2626

2727
RedisPubSub.prototype = Object.create(PubSub.prototype);
2828

29-
RedisPubSub.prototype.close = function (callback) {
29+
RedisPubSub.prototype.close = function(callback) {
3030
if (!callback) {
31-
callback = function (err) {
31+
callback = function(err) {
3232
if (err) throw err;
3333
};
3434
}
3535
var pubsub = this;
36-
PubSub.prototype.close.call(this, function (err) {
36+
PubSub.prototype.close.call(this, function(err) {
3737
if (err) return callback(err);
38-
pubsub._close().then(function () {
38+
pubsub._close().then(function() {
3939
callback();
4040
}, callback);
4141
});
4242
};
4343

44-
RedisPubSub.prototype._close = function () {
44+
RedisPubSub.prototype._close = function() {
4545
var pubsub = this;
4646

47-
if(!this._closing) {
47+
if (!this._closing) {
4848
this._closing = this._connect()
49-
.then(function () {
49+
.then(function() {
5050
return Promise.all([
5151
close(pubsub.client),
5252
close(pubsub.observer)
53-
])
53+
]);
5454
});
5555
}
5656

5757
return this._closing;
5858
};
5959

60-
RedisPubSub.prototype._subscribe = function (channel, callback) {
60+
RedisPubSub.prototype._subscribe = function(channel, callback) {
6161
var pubsub = this;
6262
pubsub.observer
63-
.subscribe(channel, function (message) {
63+
.subscribe(channel, function(message) {
6464
var data = JSON.parse(message);
6565
pubsub._emit(channel, data);
6666
})
67-
.then(function () {
67+
.then(function() {
6868
callback();
6969
}, callback);
7070
};
7171

72-
RedisPubSub.prototype._unsubscribe = function (channel, callback) {
72+
RedisPubSub.prototype._unsubscribe = function(channel, callback) {
7373
this.observer.unsubscribe(channel)
74-
.then(function () {
74+
.then(function() {
7575
callback();
7676
}, callback);
7777
};
7878

79-
RedisPubSub.prototype._publish = function (channels, data, callback) {
79+
RedisPubSub.prototype._publish = function(channels, data, callback) {
8080
var message = JSON.stringify(data);
8181
var args = [message].concat(channels);
82-
this.client.eval(PUBLISH_SCRIPT, { arguments: args }).then(function () {
82+
this.client.eval(PUBLISH_SCRIPT, {arguments: args}).then(function() {
8383
callback();
8484
}, callback);
8585
};
8686

87-
RedisPubSub.prototype._connect = function () {
87+
RedisPubSub.prototype._connect = function() {
8888
this._clientConnection = this._clientConnection || connect(this.client);
8989
this._observerConnection = this._observerConnection || connect(this.observer);
9090
return Promise.all([

0 commit comments

Comments
 (0)