
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@types/cookie
Advanced tools
Stub TypeScript definitions entry for cookie, which provides its own types definitions
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
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.
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 });
The 'cookie' package is the JavaScript library that @types/cookie provides types for. It handles parsing and serializing cookies but lacks built-in TypeScript support, which @types/cookie provides.
js-cookie is a simple, lightweight JavaScript API for handling cookies. It works well in all browsers and provides a more fluent API for dealing with cookies compared to the 'cookie' package. However, it does not provide type definitions by default, unlike @types/cookie.
tough-cookie is another npm package for handling cookies in Node.js. It offers more robust handling of cookies, including parsing and serialization as well as a built-in jar for storing cookies. It is more feature-rich compared to 'cookie' but also more complex and does not come with TypeScript types out of the box.
This is a stub types definition for @types/cookie (https://github.com/jshttp/cookie#readme).
cookie provides its own type definitions, so you don't need @types/cookie installed!
FAQs
Did you know?
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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.