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

@tinyhttp/req

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/req - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

dist/index.d.ts

@@ -6,5 +6,5 @@ import { IncomingMessage as Request, ServerResponse as Response } from 'http';

export declare const getRequestHeader: (req: Pick<Request, 'headers'>) => (header: string) => string | string[];
export declare const getRangeFromHeader: (req: Pick<Request, 'headers'>) => (size: number, options?: Options) => -1 | -2 | parseRange.Ranges;
export declare const getRangeFromHeader: (req: Pick<Request, 'headers'>) => (size: number, options?: Options) => parseRange.Result | parseRange.Ranges;
export declare const getFreshOrStale: (req: Pick<Request, 'headers' | 'method'>, res: Pick<Response, 'getHeader' | 'statusCode'>) => boolean;
export declare const checkIfXMLHttpRequest: (req: Pick<Request, 'headers'>) => boolean;
export declare const reqIs: (req: Pick<Request, 'headers'>) => (...types: string[]) => boolean;

@@ -37,3 +37,3 @@ import parseRange from 'range-parser';

return fresh(req.headers, {
etag: getRequestHeader(req)('ETag'),
etag: res.getHeader('ETag'),
'last-modified': res.getHeader('Last-Modified')

@@ -40,0 +40,0 @@ });

{
"name": "@tinyhttp/req",
"version": "1.2.1",
"version": "1.2.2",
"type": "module",

@@ -5,0 +5,0 @@ "description": "request extensions for tinyhttp",

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