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

@tinyhttp/res

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/res - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

dist/append.d.ts
/// <reference types="node" />
import { ServerResponse as S } from 'http';
export declare const append: <Response_1 extends Pick<S, "getHeader" | "setHeader"> = Pick<S, "getHeader" | "setHeader">>(res: Response_1) => (field: string, value: string | number | string[]) => Response_1;
export declare const append: <Response_1 extends Pick<S, "setHeader" | "getHeader"> = Pick<S, "setHeader" | "getHeader">>(res: Response_1) => (field: string, value: string | number | string[]) => Response_1;

@@ -0,0 +0,0 @@ /// <reference types="node" />

@@ -0,0 +0,0 @@ /// <reference types="node" />

@@ -12,3 +12,3 @@ /// <reference types="node" />

declare type next = (err?: FormatError) => void;
export declare const formatResponse: <Request_1 extends Pick<I, "headers"> = Pick<I, "headers">, Response_1 extends Pick<S, "statusCode" | "setHeader" | "getHeader" | "end"> = Pick<S, "statusCode" | "setHeader" | "getHeader" | "end">, Next extends next = next>(req: Request_1, res: Response_1, next: Next) => (obj: FormatProps) => Response_1;
export declare const formatResponse: <Request_1 extends Pick<I, "headers"> = Pick<I, "headers">, Response_1 extends Pick<S, "setHeader" | "getHeader" | "statusCode" | "end"> = Pick<S, "setHeader" | "getHeader" | "statusCode" | "end">, Next extends next = next>(req: Request_1, res: Response_1, next: Next) => (obj: FormatProps) => Response_1;
export {};

@@ -0,0 +0,0 @@ /// <reference types="node" />

@@ -0,0 +0,0 @@ export * from '@tinyhttp/send';

@@ -200,9 +200,5 @@ import { sendFile } from '@tinyhttp/send';

// merge user-provided options
opts = Object.create(opts);
opts.headers = headers;
// Resolve the full path for sendFile
const fullPath = resolve(path);
const noop = () => undefined;
opts = { ...opts, headers };
// send file
return sendFile(res)(fullPath, opts, done || noop);
return sendFile(res)(resolve(path), opts, done || (() => undefined));
};

@@ -209,0 +205,0 @@ const attachment = (res) => (filename) => {

@@ -5,3 +5,3 @@ /// <reference types="node" />

declare type next = (err?: any) => void;
export declare const redirect: <Request_1 extends Pick<I, "headers" | "method"> = Pick<I, "headers" | "method">, Response_1 extends Pick<S, "statusCode" | "setHeader" | "getHeader" | "end"> = Pick<S, "statusCode" | "setHeader" | "getHeader" | "end">, Next extends next = next>(req: Request_1, res: Response_1, next: Next) => (url: string, status?: number) => Response_1;
export declare const redirect: <Request_1 extends Pick<I, "headers" | "method"> = Pick<I, "headers" | "method">, Response_1 extends Pick<S, "setHeader" | "getHeader" | "statusCode" | "end"> = Pick<S, "setHeader" | "getHeader" | "statusCode" | "end">, Next extends next = next>(req: Request_1, res: Response_1, next: Next) => (url: string, status?: number) => Response_1;
export {};

@@ -0,0 +0,0 @@ export declare const normalizeType: (type: string) => {

{
"name": "@tinyhttp/res",
"version": "1.1.3",
"version": "1.1.4",
"type": "module",

@@ -5,0 +5,0 @@ "description": "response 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