Socket
Socket
Sign inDemoInstall

@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.3 to 0.5.4

6

CHANGELOG.md
# @tinyhttp/content-disposition
## 0.5.4
### Patch Changes
- Strip some bytes
## 0.5.3

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

2

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

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

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

function pdecode(_str: string, hex: string) {
return String.fromCharCode(parseInt(hex, 16))
}
const pdecode = (_str: string, hex: string) => String.fromCharCode(parseInt(hex, 16))

@@ -138,10 +136,4 @@ /**

// 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)))
}

@@ -152,5 +144,3 @@

if (!match) {
throw new TypeError('invalid extended field value')
}
if (!match) throw new TypeError('invalid extended field value')

@@ -203,5 +193,3 @@ const charset = match[1].toLowerCase()

while ((match = PARAM_REGEXP.exec(string))) {
if (match.index !== index) {
throw new TypeError('invalid parameter format')
}
if (match.index !== index) throw new TypeError('invalid parameter format')

@@ -212,5 +200,3 @@ index += match[0].length

if (names.indexOf(key) !== -1) {
throw new TypeError('invalid duplicate parameter')
}
if (names.indexOf(key) !== -1) throw new TypeError('invalid duplicate parameter')

@@ -217,0 +203,0 @@ names.push(key)

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