@tinyhttp/content-disposition
Advanced tools
Comparing version 1.0.0 to 1.0.1
# @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 @@ |
{ | ||
"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 |
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
26576
510
109