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 1.0.0 to 1.0.1

6

CHANGELOG.md
# @tinyhttp/content-disposition
## 1.0.1
### Patch Changes
- Remove license notes from readmes, add readme for type-is
## 1.0.0

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

2

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

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

@@ -66,3 +66,5 @@ # @tinyhttp/accepts

```js
const 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'
)
```

@@ -97,3 +99,3 @@

http.createServer((req, res) => {
createServer((req, res) => {
// set headers

@@ -109,5 +111,1 @@ res.setHeader('Content-Type', 'application/pdf')

```
## License
MIT © [v1rtl](https://v1rtl.site)

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

function ustring(val: unknown) {
function ustring(val: unknown): string {
const str = String(val)

@@ -95,5 +95,7 @@

if (typeof fallback !== 'string' && typeof fallback !== 'boolean') throw new TypeError('fallback must be a string or boolean')
if (typeof fallback !== 'string' && typeof fallback !== 'boolean')
throw new TypeError('fallback must be a string or boolean')
if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) throw new TypeError('fallback must be ISO-8859-1 string')
if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback))
throw new TypeError('fallback must be ISO-8859-1 string')

@@ -100,0 +102,0 @@ // restrict to file base name

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