Skip to content

CookieStorage

Constructors

new CookieStorage()

new CookieStorage(): CookieStorage

Returns

CookieStorage

Source

src/save/CookieStorage.ts:10

Accessors

debug

set debug(pValue): void

Parameters

pValue: boolean

Source

src/save/CookieStorage.ts:26


hasUserData

get hasUserData(): boolean

Returns

boolean

Source

src/save/CookieStorage.ts:21


NEVER_EXPIRE_DATE

get static NEVER_EXPIRE_DATE(): Date

Returns

Date

Source

src/save/CookieStorage.ts:17

Methods

deleteAllData()

deleteAllData(): void

Deletes all data saved in the cookies

Returns

void

Source

src/save/CookieStorage.ts:159


deleteItem()

deleteItem(pID): void

Parameters

pID: string

Returns

void

Source

src/save/CookieStorage.ts:118


printAll()

printAll(): void

Prints all values stored in cookies

Returns

void

Source

src/save/CookieStorage.ts:129


readBool()

readBool(pID, pDefault): boolean

Reads a Bool

Parameters

pID: string

The ID to read the bool

pDefault: boolean= false

The default value of the returned bool

Returns

boolean

Source

src/save/CookieStorage.ts:49


readNumber()

readNumber(pID, pDefault): number

Reads a Number

Parameters

pID: string

The ID to read the number

pDefault: number= 0

The default value of the returned number

Returns

number

Source

src/save/CookieStorage.ts:79


readString()

readString(pID, pDefault): string

Reads a String

Parameters

pID: string

The ID to read the string

pDefault: string= ''

The default value of the returned string

Returns

string

Source

src/save/CookieStorage.ts:108


setCookieExpiration()

setCookieExpiration(pID, pExpiryDate): void

Sets the Expiration date of a cookie

Parameters

pID: string

The ID of the cookie

pExpiryDate: Date

The expiry date at which this saved data will be deleted

Returns

void

Source

src/save/CookieStorage.ts:140


storeBool()

storeBool(pID, pValue, pExpiryDate?): void

Stores a Bool

Parameters

pID: string

The ID to store the bool

pValue: boolean

The stored bool value

pExpiryDate?: Date

The expiry date at which this saved data will be deleted

Returns

void

Source

src/save/CookieStorage.ts:37


storeNumber()

storeNumber(pID, pValue, pExpiryDate?): void

Stores a Number

Parameters

pID: string

The ID to store the number

pValue: number

The stored number value

pExpiryDate?: Date

The expiry date at which this saved data will be deleted

Returns

void

Source

src/save/CookieStorage.ts:67


storeString()

storeString(pID, pValue, pExpiryDate?): void

Stores a String

Parameters

pID: string

The ID to store the string

pValue: string

The stored string value

pExpiryDate?: Date

The expiry date at which this saved data will be deleted

Returns

void

Source

src/save/CookieStorage.ts:97