serve-favicon
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -0,1 +1,6 @@ | ||
2.1.6 / 2014-10-16 | ||
================== | ||
* deps: etag@~1.5.0 | ||
2.1.5 / 2014-09-24 | ||
@@ -2,0 +7,0 @@ ================== |
38
index.js
@@ -11,2 +11,3 @@ /*! | ||
* Module dependencies. | ||
* @private | ||
*/ | ||
@@ -23,2 +24,3 @@ | ||
* Module variables. | ||
* @private | ||
*/ | ||
@@ -31,6 +33,6 @@ | ||
* | ||
* @public | ||
* @param {String|Buffer} path | ||
* @param {Object} options | ||
* @return {Function} middleware | ||
* @api public | ||
*/ | ||
@@ -81,2 +83,10 @@ | ||
/** | ||
* Calculate the max-age from a configured value. | ||
* | ||
* @private | ||
* @param {string|number} val | ||
* @return {number} | ||
*/ | ||
function calcMaxAge(val) { | ||
@@ -92,2 +102,11 @@ var num = typeof val === 'string' | ||
/** | ||
* Create icon data from Buffer and max-age. | ||
* | ||
* @private | ||
* @param {Buffer} buf | ||
* @param {number} maxAge | ||
* @return {object} | ||
*/ | ||
function createIcon(buf, maxAge) { | ||
@@ -103,2 +122,10 @@ return { | ||
/** | ||
* Create EISDIR error. | ||
* | ||
* @private | ||
* @param {string} path | ||
* @return {Error} | ||
*/ | ||
function createIsDirError(path) { | ||
@@ -113,2 +140,11 @@ var error = new Error('EISDIR, illegal operation on directory \'' + path + '\''); | ||
/** | ||
* Send icon data in response to a request. | ||
* | ||
* @private | ||
* @param {IncomingMessage} req | ||
* @param {OutgoingMessage} res | ||
* @param {object} icon | ||
*/ | ||
function send(req, res, icon) { | ||
@@ -115,0 +151,0 @@ var headers = icon.headers; |
{ | ||
"name": "serve-favicon", | ||
"description": "favicon serving middleware with caching", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -14,3 +14,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"etag": "~1.4.0", | ||
"etag": "~1.5.0", | ||
"fresh": "0.2.4", | ||
@@ -21,6 +21,6 @@ "ms": "0.6.2" | ||
"istanbul": "0.3.2", | ||
"mocha": "~1.21.4", | ||
"mocha": "~1.21.5", | ||
"proxyquire": "~1.0.1", | ||
"should": "~4.0.1", | ||
"supertest": "~0.13.0" | ||
"supertest": "~0.14.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "files": [ |
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
9444
135
+ Addedcrc@3.2.1(transitive)
+ Addedetag@1.5.1(transitive)
- Removedcrc@3.0.0(transitive)
- Removedetag@1.4.0(transitive)
Updatedetag@~1.5.0