content-security-policy-builder
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -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
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
4764
6
40
0
0
8
24