cookie Function
Creates and returns a singleton instance of the Cookie class and ensures that only one instance is created. If the instance already exists, it returns the existing one
@template T extends CookieData<any> = CookieData<string | undefined>
Represents an object that includes both the value and parameters for the cookie.
Defaults to CookieData<string | undefined>
@returns Cookie<T>
See also: CookieData
API
function cookie<T extends CookieData<any> = CookieData<string | undefined>>(): Cookie<T>;
Example
import {cookie} from '@bitfiber/rx';
const ck = cookie();