Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/accepts

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/accepts - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

CHANGELOG.md
# @tinyhttp/accepts
## 0.5.2
### Patch Changes
- make types more flexible
## 0.5.1

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

4

dist/index.d.ts
/// <reference types="node" />
import Negotiator from 'negotiator';
import { IncomingMessage, IncomingHttpHeaders } from 'http';
import { IncomingMessage as I, IncomingHttpHeaders } from 'http';
export declare class Accepts {
headers: IncomingHttpHeaders;
negotiator: Negotiator;
constructor(req: IncomingMessage);
constructor(req: Pick<I, 'headers'>);
/**

@@ -9,0 +9,0 @@ * Check if the given `type(s)` is acceptable, returning the best match when true, otherwise `false`, in which case you should respond with 406 "Not Acceptable".

{
"name": "@tinyhttp/accepts",
"description": "accepts rewrite in TypeScript with ESM and CommonJS targets",
"version": "0.5.1",
"version": "0.5.2",
"homepage": "https://github.com/talentlessguy/tinyhttp#readme",

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

import Negotiator from 'negotiator'
import { IncomingMessage, IncomingHttpHeaders } from 'http'
import { IncomingMessage as I, IncomingHttpHeaders } from 'http'
import { lookup } from 'es-mime-types'

@@ -12,3 +12,3 @@

negotiator: Negotiator
constructor(req: IncomingMessage) {
constructor(req: Pick<I, 'headers'>) {
this.headers = req.headers

@@ -15,0 +15,0 @@ this.negotiator = new Negotiator(req)

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