You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@types/cookie

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/cookie

TypeScript definitions for cookie


Version published
Weekly downloads
11M
increased by1.95%
Maintainers
1
Created
Weekly downloads
 

Package description

What is @types/cookie?

The @types/cookie package provides TypeScript type definitions for the 'cookie' npm package, which is used for parsing and serializing cookies in Node.js applications. This package does not include any functionality by itself but offers type support to enhance development experience in TypeScript environments.

What are @types/cookie's main functionalities?

Parsing Cookies

This feature allows developers to parse a cookie string into an object. The parse function takes a string and returns an object where each property corresponds to a cookie name and its value.

import { parse } from 'cookie';
const cookies = parse('foo=bar; equation=E%3Dmc%5E2');

Serializing Cookies

This feature enables developers to serialize a cookie name and value into a cookie header string. Additional options can be provided to set cookie attributes such as 'httpOnly', 'secure', etc.

import { serialize } from 'cookie';
const cookie = serialize('foo', 'bar', { httpOnly: true });

Other packages similar to @types/cookie

Readme

Source

Installation

npm install --save @types/cookie

Summary

This package contains type definitions for cookie (https://github.com/jshttp/cookie).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie.

Additional Details

  • Last updated: Sun, 26 Nov 2023 22:07:01 GMT
  • Dependencies: none

Credits

These definitions were written by Pine Mizune, and Piotr Błażejewicz.

FAQs

Package last updated on 26 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc