Apply automatic eslint fixes

This commit is contained in:
Daniel García Aubert
2019-10-21 19:07:24 +02:00
parent 593d9e40f6
commit 4d70ac0894
246 changed files with 11782 additions and 11454 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
var FastlyPurge = require('fastly-purge');
function FastlyCacheBackend(apiKey, serviceId) {
function FastlyCacheBackend (apiKey, serviceId) {
this.serviceId = serviceId;
this.fastlyPurge = new FastlyPurge(apiKey, { softPurge: false });
}
@@ -13,6 +13,6 @@ module.exports = FastlyCacheBackend;
* @param cacheObject should respond to `key() -> String` method
* @param {Function} callback
*/
FastlyCacheBackend.prototype.invalidate = function(cacheObject, callback) {
FastlyCacheBackend.prototype.invalidate = function (cacheObject, callback) {
this.fastlyPurge.key(this.serviceId, cacheObject.key(), callback);
};
+3 -3
View File
@@ -2,7 +2,7 @@
var request = require('request');
function VarnishHttpCacheBackend(host, port) {
function VarnishHttpCacheBackend (host, port) {
this.host = host;
this.port = port;
}
@@ -13,7 +13,7 @@ module.exports = VarnishHttpCacheBackend;
* @param cacheObject should respond to `key() -> String` method
* @param {Function} callback
*/
VarnishHttpCacheBackend.prototype.invalidate = function(cacheObject, callback) {
VarnishHttpCacheBackend.prototype.invalidate = function (cacheObject, callback) {
request(
{
method: 'PURGE',
@@ -22,7 +22,7 @@ VarnishHttpCacheBackend.prototype.invalidate = function(cacheObject, callback) {
'Invalidation-Match': '\\b' + cacheObject.key() + '\\b'
}
},
function(err, response) {
function (err, response) {
if (err || response.statusCode !== 204) {
return callback(new Error('Unable to invalidate Varnish object'));
}