CookieStorage

import {CookieStorage} from 'cabbie-async';

Managing cookie-storage

Methods

clear(): Promise<void>

Delete all cookies visible to the current page.

getCookie(name): Promise<Cookie | void>

name
string

Retrieve a specific cookie by name that is visible to the current page.

getCookies(): Promise<Array<Cookie>>

Retrieve all cookies visible to the current page.

getKeys(): Promise<Array<string>>

Retrieve all cookie names visible to the current page.

getSize(): Promise<number>

Get the number of items in the storage

removeCookie(name): Promise<void>

name
string

Delete the cookie with the given name.

setCookie(cookie): Promise<void>

cookie
Cookie

Set a cookie that is visible to the current page.