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 0.1.0 to 0.1.1

6

CHANGELOG.md
# @tinyhttp/req
## 0.1.1
### Patch Changes
- minor fixes
## 0.1.0

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

1

dist/index.d.ts
import { IncomingMessage as Request, ServerResponse as Response } from 'http';
import parseRange, { Options } from 'range-parser';
export declare const getRequestHeader: (req: Request) => (header: string) => string | string[];
export declare const setRequestHeader: (req: Request) => (field: string, value: string) => string;
export declare const getRangeFromHeader: (req: Request) => (size: number, options?: Options) => -1 | -2 | parseRange.Ranges;

@@ -6,0 +5,0 @@ export declare const getFreshOrStale: (req: Request, res: Response) => boolean;

@@ -15,5 +15,2 @@ import parseRange from 'range-parser';

};
const setRequestHeader = (req) => (field, value) => {
return (req.headers[field.toLowerCase()] = value);
};
const getRangeFromHeader = (req) => (size, options) => {

@@ -48,2 +45,2 @@ const range = getRequestHeader(req)('Range');

export { checkIfXMLHttpRequest, getAccepts, getFreshOrStale, getRangeFromHeader, getRequestHeader, setRequestHeader };
export { checkIfXMLHttpRequest, getAccepts, getFreshOrStale, getRangeFromHeader, getRequestHeader };
{
"name": "@tinyhttp/req",
"version": "0.1.0",
"version": "0.1.1",
"type": "module",

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

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

export const setRequestHeader = (req: Request) => (field: string, value: string) => {
return (req.headers[field.toLowerCase()] = value)
}
export const getRangeFromHeader = (req: Request) => (size: number, options?: Options) => {

@@ -24,0 +20,0 @@ const range = getRequestHeader(req)('Range') as string

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