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

@tinyhttp/content-disposition

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/content-disposition - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

6

CHANGELOG.md
# @tinyhttp/content-disposition
## 0.5.5
### Patch Changes
- bump
## 0.5.4

@@ -4,0 +10,0 @@

19

dist/index.js

@@ -80,5 +80,3 @@ import { basename } from 'path';

}
function pdecode(_str, hex) {
return String.fromCharCode(parseInt(hex, 16));
}
const pdecode = (_str, hex) => String.fromCharCode(parseInt(hex, 16));
/**

@@ -92,14 +90,9 @@ * Create an attachment Content-Disposition header.

const opts = options || {};
// get type
const type = opts.type || 'attachment';
// get parameters
const params = createParams(filename, opts.fallback);
// format into string
return format(new ContentDisposition(type, params));
return format(new ContentDisposition(opts.type || 'attachment', createParams(filename, opts.fallback)));
}
function decodefield(str) {
const match = EXT_VALUE_REGEXP.exec(str);
if (!match) {
if (!match)
throw new TypeError('invalid extended field value');
}
const charset = match[1].toLowerCase();

@@ -143,11 +136,9 @@ const encoded = match[2];

while ((match = PARAM_REGEXP.exec(string))) {
if (match.index !== index) {
if (match.index !== index)
throw new TypeError('invalid parameter format');
}
index += match[0].length;
key = match[1].toLowerCase();
value = match[2];
if (names.indexOf(key) !== -1) {
if (names.indexOf(key) !== -1)
throw new TypeError('invalid duplicate parameter');
}
names.push(key);

@@ -154,0 +145,0 @@ if (key.indexOf('*') + 1 === key.length) {

{
"name": "@tinyhttp/content-disposition",
"description": "content-disposition rewrite in TypeScript with ESM and CommonJS targets",
"version": "0.5.4",
"version": "0.5.5",
"homepage": "https://github.com/talentlessguy/tinyhttp#readme",

@@ -6,0 +6,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

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