helmet-csp
Advanced tools
Comparing version 1.2.0 to 1.2.1
var camelize = require('camelize') | ||
var cspBuilder = require('content-security-policy-builder') | ||
var isFunction = require('lodash.isfunction') | ||
var isFunction = require('./lib/is-function') | ||
var platform = require('platform') | ||
@@ -5,0 +5,0 @@ var containsFunction = require('./lib/contains-function') |
@@ -1,12 +0,19 @@ | ||
var some = require('lodash.some') | ||
var isFunction = require('lodash.isfunction') | ||
var isFunction = require('./is-function') | ||
module.exports = function containsFunction (obj) { | ||
return some(obj, function (arr) { | ||
if (!Array.isArray(arr)) { | ||
arr = [arr] | ||
for (var key in obj) { | ||
if (!obj.hasOwnProperty(key)) { continue } | ||
var value = obj[key] | ||
if (!Array.isArray(value)) { | ||
value = [value] | ||
} | ||
return arr.some(isFunction) | ||
}) | ||
if (value.some(isFunction)) { | ||
return true | ||
} | ||
} | ||
return false | ||
} |
var reduce = require('lodash.reduce') | ||
var isFunction = require('lodash.isfunction') | ||
var isFunction = require('./is-function') | ||
@@ -4,0 +4,0 @@ module.exports = function parseDynamicDirectives (directives, functionArgs) { |
@@ -1,2 +0,2 @@ | ||
var assign = require('lodash.assign') | ||
var assign = require('./assign') | ||
var reduce = require('lodash.reduce') | ||
@@ -3,0 +3,0 @@ |
@@ -9,3 +9,3 @@ { | ||
"description": "Content Security Policy middleware.", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"license": "MIT", | ||
@@ -29,3 +29,4 @@ "keywords": [ | ||
"scripts": { | ||
"test": "standard && mocha" | ||
"pretest": "standard", | ||
"test": "mocha" | ||
}, | ||
@@ -35,6 +36,3 @@ "dependencies": { | ||
"content-security-policy-builder": "1.0.0", | ||
"lodash.assign": "4.0.9", | ||
"lodash.isfunction": "3.0.8", | ||
"lodash.reduce": "4.4.0", | ||
"lodash.some": "4.4.0", | ||
"platform": "1.3.1" | ||
@@ -45,4 +43,4 @@ }, | ||
"express": "^4.13.4", | ||
"lodash": "^4.5.1", | ||
"mocha": "^2.4.5", | ||
"lodash": "^4.13.1", | ||
"mocha": "^2.5.3", | ||
"standard": "^7.1.0", | ||
@@ -49,0 +47,0 @@ "supertest": "^1.2.0" |
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
14427
4
12
263
- Removedlodash.assign@4.0.9
- Removedlodash.isfunction@3.0.8
- Removedlodash.some@4.4.0
- Removedlodash.assign@4.0.9(transitive)
- Removedlodash.isfunction@3.0.8(transitive)
- Removedlodash.keys@4.2.0(transitive)
- Removedlodash.rest@4.0.5(transitive)
- Removedlodash.some@4.4.0(transitive)