@tinyhttp/type-is
Advanced tools
Comparing version 0.5.0 to 0.5.1
# @tinyhttp/type-is | ||
## 0.5.1 | ||
### Patch Changes | ||
- Fix import | ||
## 0.5.0 | ||
@@ -4,0 +10,0 @@ |
import { lookup } from 'es-mime-types'; | ||
import typer from 'es-content-type'; | ||
import { format, parse } from 'es-content-type'; | ||
function normalizeType(value) { | ||
// parse the type | ||
const type = typer.parse(value); | ||
const type = parse(value); | ||
type.parameters = {}; | ||
// reformat it | ||
return typer.format(type); | ||
return format(type); | ||
} | ||
@@ -11,0 +11,0 @@ function tryNormalizeType(value) { |
{ | ||
"name": "@tinyhttp/type-is", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "TypeScript rewrite of type-is with CJS and ESM targets", |
@@ -1,3 +0,3 @@ | ||
import * as mime from 'es-mime-types' | ||
import typer from 'es-content-type' | ||
import { lookup } from 'es-mime-types' | ||
import * as typer from 'es-content-type' | ||
@@ -73,3 +73,3 @@ function normalizeType(value: string) { | ||
return type.indexOf('/') === -1 ? mime.lookup(type) : type | ||
return type.indexOf('/') === -1 ? lookup(type) : type | ||
} | ||
@@ -76,0 +76,0 @@ |
Sorry, the diff of this file is not supported yet
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
10296
279