UNPKG

kawkab-frontend

Version:

Kawkab frontend is a frontend library for the Kawkab framework

32 lines (31 loc) 989 B
/** * Reads a specific cookie value from the browser. * @param name The name of the cookie. * @returns The cookie value as a string, or null if not found. */ declare function get(name: string, defaultValue?: string): string | null; /** * Sets a cookie value in the browser. * @param name The name of the cookie. * @param value The value to be stored. * @param days The number of days the cookie will be valid for. */ declare function set(name: string, value: string, days?: number): void; /** * Checks if a cookie with the given name exists. * @param name The name of the cookie to check. * @returns True if the cookie exists, false otherwise. */ declare function has(name: string): boolean; /** * Removes a specific cookie from the browser. * @param name The name of the cookie to remove. */ declare function remove(name: string): void; export declare const Cookie: { get: typeof get; set: typeof set; has: typeof has; remove: typeof remove; }; export {};