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

helmet-csp

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helmet-csp - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

lib/assign.js

2

index.js
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"

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