Socket
Socket
Sign inDemoInstall

frameguard

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frameguard - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

lib/isstring.js

22

index.js

@@ -1,20 +0,10 @@

var isString = require('lodash.isstring')
var isString = require('./lib/isstring')
function isObject (value) {
return !!value && typeof value === 'object'
}
module.exports = function frameguard (options) {
options = options || {}
module.exports = function frameguard (action, domain) {
var domain = options.domain
var action = options.action
var directive
// This converts String objects.
if (isString(action)) {
action = action.valueOf()
}
if (isObject(action)) {
domain = action.domain
action = action.action
}
if (action === undefined) {

@@ -21,0 +11,0 @@ directive = 'SAMEORIGIN'

@@ -8,3 +8,3 @@ {

"description": "Middleware to set X-Frame-Options headers",
"version": "1.1.0",
"version": "2.0.0",
"license": "MIT",

@@ -28,5 +28,2 @@ "keywords": [

},
"dependencies": {
"lodash.isstring": "4.0.1"
},
"devDependencies": {

@@ -33,0 +30,0 @@ "connect": "^3.4.1",

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