
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@types/cookie_js
Advanced tools
TypeScript definitions for cookie_js
npm install --save @types/cookie_js
This package contains type definitions for cookie_js (https://github.com/florian/cookie.js).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie_js.
declare module "cookie_js" {
export = cookie;
}
/**
* https://github.com/DefinitelyTyped/DefinitelyTyped/pull/16025#issuecomment-295784660
*/
declare module "cookiejs" {
export = cookie;
}
declare function cookie(key: string, fallback?: string): string;
declare function cookie(keys: string[], fallback?: string): string;
interface UtilStatic {
isArray: (value: any) => boolean;
isObject: (value: any) => boolean;
toArray: (...args: any[]) => any[];
getKeys: (value: {}) => any[];
encode: (value: string) => string;
decode: (value: string) => string;
retrieve: (x: string, y: string) => string;
}
interface Options {
expires: number | string | Date;
domain: string;
path: string;
secure: boolean;
}
declare namespace cookie {
/**
* Create a cookie. The value will automatically be escaped.
*/
export function set(key: string, value: string, options?: any): void;
/**
* Set several cookies at once
*/
export function set(obj: any, options?: any): void;
/**
* Remove cookies
*/
export function remove(key: string): void;
export function remove(keys: string[]): void;
export function remove(...args: string[]): void;
/**
* Remove cookies that were set with custom options (e.g. specifing domain or path)
*/
export function removeSpecific(key: string, options?: any): void;
export function removeSpecific(keys: string[], options?: any): void;
/**
* Remove all cookies
*/
export function empty(): void;
/**
* Retrieve the value of the cookie
*/
export function get(key: string, fallback?: string): string;
/**
* Retrieve values of several cookies
*/
export function get(keys: string[], fallback?: string): any;
/**
* Get all currently saved cookies
*/
export function all(): any;
/**
* Test if cookies are enabled
*/
export function enabled(): boolean;
/**
* Utility methods
*/
export var utils: UtilStatic;
/**
* Set default options
*/
export var defaults: Options;
}
These definitions were written by slawiko.
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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.