Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serve-favicon

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve-favicon - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6

5

HISTORY.md

@@ -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;

8

package.json
{
"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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc