Comparing version 0.2.1 to 0.2.2
'use strict'; | ||
var _ = require('lodash'); | ||
var defaults = _.defaults; | ||
var isString = _.isString; | ||
var isArray = _.isArray; | ||
var defaults = require('lodash/defaults'); | ||
var isString = require('lodash/isString'); | ||
var isArray = require('lodash/isArray'); | ||
@@ -85,3 +84,3 @@ var typeis = require('type-is'); | ||
// Put aside only once in case multiple HPP middlewares are used | ||
if (reqPolluted === undefined) { // Check identical to _.isUndefined(reqPolluted) | ||
if (reqPolluted === undefined) { // Check identical to lodash's isUndefined(reqPolluted) | ||
@@ -88,0 +87,0 @@ reqPolluted = req[keyPolluted] = {}; |
{ | ||
"name": "hpp", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Express middleware to protect against HTTP Parameter Pollution attacks", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -131,3 +131,3 @@ # HPP | ||
A [performance test](test/spec/perf.js) that includes two HPP middlewares plus a whitelist simulates an already demanding use case. On my Mac Book Air it measures **0.02ms to process a single request**. | ||
A [performance test](test/spec/perf.js) that includes two HPP middlewares plus a whitelist simulates an already demanding use case. On my Mac Book Air it measures **0.002ms to process a single request**. | ||
@@ -150,2 +150,5 @@ ## Contributing | ||
- v0.2.2 (2017-04-11) | ||
- Requiring individual lodash functions for faster boot time and lower memory footprint | ||
*(Thanks to @mschipperheyn for suggesting this in [issue #6](https://github.com/analog-nico/hpp/issues/6))* | ||
- v0.2.1 (2016-04-03) | ||
@@ -152,0 +155,0 @@ - Added node v4 and v5 to CI build |
Sorry, the diff of this file is not supported yet
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
12908
181
110