serve-favicon
Advanced tools
Comparing version 2.4.2 to 2.4.3
@@ -0,1 +1,7 @@ | ||
2.4.3 / 2017-05-16 | ||
================== | ||
* Use `safe-buffer` for improved Buffer API | ||
* deps: ms@2.0.0 | ||
2.4.2 / 2017-03-24 | ||
@@ -2,0 +8,0 @@ ================== |
16
index.js
@@ -16,2 +16,3 @@ /*! | ||
var Buffer = require('safe-buffer').Buffer | ||
var etag = require('etag') | ||
@@ -59,3 +60,3 @@ var fresh = require('fresh') | ||
if (Buffer.isBuffer(path)) { | ||
icon = createIcon(copyBuffer(path), maxAge) | ||
icon = createIcon(Buffer.from(path), maxAge) | ||
} else if (typeof path === 'string') { | ||
@@ -113,15 +114,2 @@ path = resolveSync(path) | ||
/** | ||
* Copy a given Buffer. | ||
* | ||
* @param {Buffer} buf | ||
* @private | ||
*/ | ||
function copyBuffer (buf) { | ||
var copy = new Buffer(buf.length) | ||
buf.copy(copy) | ||
return copy | ||
} | ||
/** | ||
* Create icon data from Buffer and max-age. | ||
@@ -128,0 +116,0 @@ * |
{ | ||
"name": "serve-favicon", | ||
"description": "favicon serving middleware with caching", | ||
"version": "2.4.2", | ||
"version": "2.4.3", | ||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -16,14 +16,18 @@ "license": "MIT", | ||
"fresh": "0.5.0", | ||
"ms": "1.0.0", | ||
"parseurl": "~1.3.1" | ||
"ms": "2.0.0", | ||
"parseurl": "~1.3.1", | ||
"safe-buffer": "5.0.1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "3.18.0", | ||
"eslint-config-standard": "7.1.0", | ||
"eslint-plugin-markdown": "1.0.0-beta.4", | ||
"eslint": "3.19.0", | ||
"eslint-config-standard": "10.2.1", | ||
"eslint-plugin-import": "2.2.0", | ||
"eslint-plugin-markdown": "1.0.0-beta.6", | ||
"eslint-plugin-node": "4.2.2", | ||
"eslint-plugin-promise": "3.5.0", | ||
"eslint-plugin-standard": "2.1.1", | ||
"eslint-plugin-standard": "3.0.1", | ||
"istanbul": "0.4.5", | ||
"mocha": "2.5.3", | ||
"supertest": "1.1.0" | ||
"supertest": "1.1.0", | ||
"temp-path": "1.0.0" | ||
}, | ||
@@ -30,0 +34,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
14234
5
11
178
+ Addedsafe-buffer@5.0.1
+ Addedms@2.0.0(transitive)
+ Addedsafe-buffer@5.0.1(transitive)
- Removedms@1.0.0(transitive)
Updatedms@2.0.0