Socket
Socket
Sign inDemoInstall

content-security-policy-builder

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

CHANGELOG.md

44

package.json

@@ -5,3 +5,3 @@ {

"description": "Build Content Security Policy directives.",
"version": "2.0.0",
"version": "2.1.0",
"license": "MIT",

@@ -16,2 +16,3 @@ "keywords": [

],
"homepage": "https://github.com/helmetjs/content-security-policy-builder",
"repository": {

@@ -21,17 +22,36 @@ "type": "git",

},
"bugs": "https://github.com/helmetjs/content-security-policy-builder/issues",
"bugs": {
"url": "https://github.com/helmetjs/content-security-policy-builder/issues",
"email": "me@evanhahn.com"
},
"engines": {
"node": ">=4.0.0"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"files": [
"LICENSE",
"README.md",
"CHANGELOG.md",
"dist/index.js",
"dist/index.d.ts"
],
"scripts": {
"pretest": "standard --fix",
"test": "mocha"
"pretest": "npm run lint",
"prepublishOnly": "npm run build",
"lint": "eslint --fix '**/*.ts'",
"test": "jest --config test/jest-config.json",
"clean": "rm -rf dist",
"build": "npm run clean && tsc"
},
"devDependencies": {
"mocha": "^5.0.0",
"standard": "^10.0.3"
},
"standard": {
"globals": [
"describe",
"it"
]
"@types/jest": "^24.0.14",
"@typescript-eslint/eslint-plugin": "^1.9.0",
"@typescript-eslint/parser": "^1.9.0",
"eslint": "^5.16.0",
"eslint-config-helmet": "^0.2.0",
"jest": "^24.8.0",
"ts-jest": "^24.0.2",
"typescript": "^3.5.2"
}
}
Content Security Policy builder
===============================
[![Build Status](https://travis-ci.org/helmetjs/content-security-policy-builder.svg?branch=master)](https://travis-ci.org/helmetjs/content-security-policy-builder)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

@@ -13,3 +12,3 @@ Take an object and turn it into a Content Security Policy string. Useful for building Content Security Policy libraries.

```javascript
var builder = require("content-security-policy-builder")
const builder = require('content-security-policy-builder')

@@ -19,5 +18,5 @@ // default-src 'self' default.com; script-src scripts.com; whatever-src something; object-src

directives: {
defaultSrc: ["'self'", "default.com"],
scriptSrc: "scripts.com",
"whatever-src": "something",
defaultSrc: ["'self'", 'default.com'],
scriptSrc: 'scripts.com',
'whatever-src': 'something',
objectSrc: true

@@ -24,0 +23,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc