Socket
Socket
Sign inDemoInstall

@types/cookie-parser

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/cookie-parser - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

14

cookie-parser/index.d.ts

@@ -10,2 +10,16 @@ // Type definitions for cookie-parser 1.4

declare global {
namespace Express {
// Inject additional properties on express.Request
interface Request {
/**
* This request's secret.
* Optionally set by cookie-parser if secret(s) are provided. Can be used by other middleware.
* [Declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) can be used to add your own properties.
*/
secret?: string;
}
}
}
declare function cookieParser(secret?: string | string[], options?: cookieParser.CookieParseOptions): express.RequestHandler;

@@ -12,0 +26,0 @@

9

cookie-parser/package.json
{
"name": "@types/cookie-parser",
"version": "1.4.2",
"version": "1.4.3",
"description": "TypeScript definitions for cookie-parser",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser",
"license": "MIT",

@@ -19,3 +20,3 @@ "contributors": [

"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -30,4 +31,4 @@ "type": "git",

},
"typesPublisherContentHash": "c7f1bd64948c00975ec74c2ebc516c33bdb987d6f802c2b45a3378a31f37bf4b",
"typeScriptVersion": "2.3"
"typesPublisherContentHash": "ec228e770576f43dd247dbfd15428c81cf1fbd84c02d978f6c4f0275d6394cf0",
"typeScriptVersion": "3.9"
}

@@ -8,10 +8,54 @@ # Installation

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser/index.d.ts)
````ts
// Type definitions for cookie-parser 1.4
// Project: https://github.com/expressjs/cookie-parser
// Definitions by: Santi Albo <https://github.com/santialbo>
// BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
Additional Details
* Last updated: Mon, 19 Aug 2019 00:51:10 GMT
* Dependencies: @types/express
import * as express from 'express';
declare global {
namespace Express {
// Inject additional properties on express.Request
interface Request {
/**
* This request's secret.
* Optionally set by cookie-parser if secret(s) are provided. Can be used by other middleware.
* [Declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) can be used to add your own properties.
*/
secret?: string;
}
}
}
declare function cookieParser(secret?: string | string[], options?: cookieParser.CookieParseOptions): express.RequestHandler;
declare namespace cookieParser {
interface CookieParseOptions {
decode?(val: string): string;
}
function JSONCookie(jsonCookie: string): object | undefined;
function JSONCookies<T extends { [key: string]: string }>(jsonCookies: T): { [P in keyof T]: object | undefined };
function signedCookie(cookie: string, secret: string | string[]): string | false;
function signedCookies<T extends { [key: string]: string }>(cookies: T, secret: string | string[]): { [P in keyof T]?: string | false};
}
export = cookieParser;
````
### Additional Details
* Last updated: Wed, 27 Apr 2022 10:31:34 GMT
* Dependencies: [@types/express](https://npmjs.com/package/@types/express)
* Global values: none
# Credits
These definitions were written by Santi Albo <https://github.com/santialbo>, and BendingBender <https://github.com/BendingBender>.
These definitions were written by [Santi Albo](https://github.com/santialbo), and [BendingBender](https://github.com/BendingBender).

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