Socket
Socket
Sign inDemoInstall

@tinyhttp/type-is

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/type-is - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

6

CHANGELOG.md
# @tinyhttp/type-is
## 0.5.1
### Patch Changes
- Fix import
## 0.5.0

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

6

dist/index.js
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

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