Skip to content

Commit

Permalink
removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
inadarei committed Oct 19, 2015
1 parent a8f5b71 commit 7738213
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/connect-thumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,18 @@ exports.decodeURL = function(encodedURL, callback) {
* @param {String} encoding - defaults to hex
* @return {String}
*/
var hash = function(str, algo, encoding) {
function hash(str, algo, encoding) {
return crypto
.createHash(algo || 'sha1')
.update(str)
.digest(encoding || 'hex');
};
}

/**
* Merge user-provided options with the sensible defaults.
* @param options
*/
var parseOptions = function (options) {
function parseOptions(options) {

ttl = options.ttl || (3600 * 24); // cache for 1 day by default.
tmpCacheTTL = options.tmpCacheTTL || 5; // small by default
Expand All @@ -199,9 +199,9 @@ var parseOptions = function (options) {
// Example: http://example.com/thumbs/small/images/AB23DC16Hash.jpg
regexp = new RegExp('^\/' + rootPath.replace(/\//ig, '\\/') +
'\/([A-Za-z0-9_]+)\/images\/([%\.\-A-Za-z0-9_=\+]+)\.(?:' + szExtensions + ')$', 'i');
};
}

var defaultPresets = function() {
function defaultPresets() {

return {
small: {
Expand All @@ -218,9 +218,9 @@ var defaultPresets = function() {
}
};

};
}

var modifyImage = function(options, callback) {
function modifyImage(options, callback) {

var srcPath = options.filepath;
var dstPath = options.dstPath;
Expand Down Expand Up @@ -293,7 +293,7 @@ var modifyImage = function(options, callback) {
}

});
};
}

/**
* Detect targetHeight for a proportional resizing, when only width is indicated.
Expand All @@ -302,6 +302,6 @@ var modifyImage = function(options, callback) {
* @param origWidth
* @param origHeight
*/
var detectedHeight = function(targetWidth, origWidth, origHeight) {
function detectedHeight(targetWidth, origWidth, origHeight) {
return origHeight * targetWidth / origWidth;
};
}

0 comments on commit 7738213

Please sign in to comment.