Socket
Socket
Sign inDemoInstall

@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 2.0.3 to 2.0.4

6

dist/cookie.d.ts
/// <reference types="node" />
import { ServerResponse as S } from 'http';
import { IncomingMessage as I, ServerResponse as S } from 'http';
import * as cookie from '@tinyhttp/cookie';
declare type Res = Pick<S, 'setHeader' | 'getHeader'>;
export declare const setCookie: <Request_1 extends unknown = any, Response_1 extends Res = Res>(req: Request_1 & {
export declare const setCookie: <Request_1 extends I = I, Response_1 extends Res = Res>(req: Request_1 & {
secret?: string | string[];

@@ -10,3 +10,3 @@ }, res: Response_1) => (name: string, value: string | Record<string, unknown>, options?: cookie.SerializeOptions & Partial<{

}>) => Response_1;
export declare const clearCookie: <Request_1 extends unknown = any, Response_1 extends Res = Res>(req: Request_1, res: Response_1) => (name: string, options?: cookie.SerializeOptions) => Response_1;
export declare const clearCookie: <Request_1 extends I = I, Response_1 extends Res = Res>(req: Request_1, res: Response_1) => (name: string, options?: cookie.SerializeOptions) => Response_1;
export {};

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

statusCode: number;
types: any[];
types: string[];
};

@@ -13,0 +13,0 @@ declare type next = (err?: FormatError) => void;

@@ -1,16 +0,9 @@

export declare const normalizeType: (type: string) => {
export declare type NormalizedType = {
value: string;
quality: number;
params: {};
originalIndex: number;
} | {
value: any;
params: {};
quality?: number;
params: Record<string, any>;
originalIndex?: number;
};
export declare function acceptParams(str: string, index?: number): {
value: string;
quality: number;
params: {};
originalIndex: number;
};
export declare function normalizeTypes(types: string[]): any[];
export declare const normalizeType: (type: string) => NormalizedType;
export declare function acceptParams(str: string, index?: number): NormalizedType;
export declare function normalizeTypes(types: string[]): NormalizedType[];
{
"name": "@tinyhttp/res",
"version": "2.0.3",
"version": "2.0.4",
"type": "module",

@@ -28,8 +28,8 @@ "description": "response extensions for tinyhttp",

"dependencies": {
"@tinyhttp/content-disposition": "2.0.2",
"@tinyhttp/cookie": "2.0.1",
"@tinyhttp/cookie-signature": "2.0.1",
"@tinyhttp/encode-url": "2.0.1",
"@tinyhttp/req": "2.0.2",
"@tinyhttp/send": "2.0.1",
"@tinyhttp/content-disposition": "2.0.3",
"@tinyhttp/cookie": "2.0.2",
"@tinyhttp/cookie-signature": "2.0.2",
"@tinyhttp/encode-url": "2.0.2",
"@tinyhttp/req": "2.0.3",
"@tinyhttp/send": "2.0.2",
"es-escape-html": "^0.1.1",

@@ -36,0 +36,0 @@ "es-mime-types": "^0.1.3",

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