content-disposition
Advanced tools
+6
-0
@@ -0,1 +1,7 @@ | ||
| 1.0.1 / 2025-11-18 | ||
| ================= | ||
| * Updated `engines` field to Node@18 or higher (fixed reference, see 1.0.0) | ||
| * Remove dependency `safe-buffer` | ||
| 1.0.0 / 2024-08-31 | ||
@@ -2,0 +8,0 @@ ================== |
+0
-1
@@ -23,3 +23,2 @@ /*! | ||
| var basename = require('path').basename | ||
| var Buffer = require('safe-buffer').Buffer | ||
@@ -26,0 +25,0 @@ /** |
+10
-11
| { | ||
| "name": "content-disposition", | ||
| "description": "Create and parse Content-Disposition header", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -14,7 +14,8 @@ "license": "MIT", | ||
| "repository": "jshttp/content-disposition", | ||
| "dependencies": { | ||
| "safe-buffer": "5.2.1" | ||
| "funding": { | ||
| "type": "opencollective", | ||
| "url": "https://opencollective.com/express" | ||
| }, | ||
| "devDependencies": { | ||
| "deep-equal": "1.0.1", | ||
| "c8": "^10.1.2", | ||
| "eslint": "7.32.0", | ||
@@ -26,5 +27,3 @@ "eslint-config-standard": "13.0.1", | ||
| "eslint-plugin-promise": "5.2.0", | ||
| "eslint-plugin-standard": "4.1.0", | ||
| "mocha": "^9.2.2", | ||
| "nyc": "15.1.0" | ||
| "eslint-plugin-standard": "4.1.0" | ||
| }, | ||
@@ -38,10 +37,10 @@ "files": [ | ||
| "engines": { | ||
| "node": ">= 0.6" | ||
| "node": ">=18" | ||
| }, | ||
| "scripts": { | ||
| "lint": "eslint .", | ||
| "test": "mocha --reporter spec --bail --check-leaks test/", | ||
| "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", | ||
| "test-cov": "nyc --reporter=html --reporter=text npm test" | ||
| "test": "node --test --test-reporter spec", | ||
| "test-ci": "c8 --reporter=lcovonly --reporter=text npm test", | ||
| "test-cov": "c8 --reporter=html --reporter=text npm test" | ||
| } | ||
| } |
+15
-15
@@ -20,3 +20,3 @@ # content-disposition | ||
| ```js | ||
| var contentDisposition = require('content-disposition') | ||
| const contentDisposition = require('content-disposition') | ||
| ``` | ||
@@ -71,3 +71,3 @@ | ||
| ```js | ||
| var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') | ||
| const disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') | ||
| ``` | ||
@@ -91,9 +91,9 @@ | ||
| ```js | ||
| var contentDisposition = require('content-disposition') | ||
| var destroy = require('destroy') | ||
| var fs = require('fs') | ||
| var http = require('http') | ||
| var onFinished = require('on-finished') | ||
| const contentDisposition = require('content-disposition') | ||
| const destroy = require('destroy') | ||
| const fs = require('fs') | ||
| const http = require('http') | ||
| const onFinished = require('on-finished') | ||
| var filePath = '/path/to/public/plans.pdf' | ||
| const filePath = '/path/to/public/plans.pdf' | ||
@@ -106,3 +106,3 @@ http.createServer(function onRequest (req, res) { | ||
| // send file | ||
| var stream = fs.createReadStream(filePath) | ||
| const stream = fs.createReadStream(filePath) | ||
| stream.pipe(res) | ||
@@ -137,11 +137,11 @@ onFinished(res, function () { | ||
| [npm-image]: https://img.shields.io/npm/v/content-disposition.svg | ||
| [npm-image]: https://img.shields.io/npm/v/content-disposition | ||
| [npm-url]: https://npmjs.org/package/content-disposition | ||
| [node-version-image]: https://img.shields.io/node/v/content-disposition.svg | ||
| [node-version-image]: https://img.shields.io/node/v/content-disposition | ||
| [node-version-url]: https://nodejs.org/en/download | ||
| [coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg | ||
| [coveralls-image]: https://img.shields.io/coverallsCoverage/github/jshttp/content-disposition | ||
| [coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master | ||
| [downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg | ||
| [downloads-image]: https://img.shields.io/npm/dm/content-disposition | ||
| [downloads-url]: https://npmjs.org/package/content-disposition | ||
| [github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci | ||
| [github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci | ||
| [github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/jshttp/content-disposition/ci.yml | ||
| [github-actions-ci-url]: https://github.com/jshttp/content-disposition/actions/workflows/ci.yml |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
19215
0.54%0
-100%8
-20%370
-0.27%- Removed
- Removed