File

src/metadata.ts

Index

Properties
Methods

Methods

clear
clear()
Returns : void
getItem
getItem(key: string)
Parameters :
Name Type Optional Description
key string
Returns : any
key
key(index: number)
Parameters :
Name Type Optional Description
index number
Returns : string
removeItem
removeItem(key: string)
Parameters :
Name Type Optional Description
key string
Returns : void
setItem
setItem(key: string, data: any, config?: IStorageSetConfig)
Parameters :
Name Type Optional Description
key string
data any
config IStorageSetConfig true
Returns : void

Properties

length
length: number
Type : number
import {Driver} from './Driver'
import {DRIVERS} from './DriverTypes'

export interface IStorageSetConfig {
  secure?: boolean
  maxAge?: number
  domain?: string
  path?: string
  expires?: Date | string
}

export interface IStorage {
  length: number

  getItem(key: string): any
  setItem(key: string, data: any, config?: IStorageSetConfig): void
  removeItem(key: string): void
  clear(): void
  key(index: number): string
}

export interface IWebStorage extends IStorage {
  hasOwnProperty(key: string): boolean
}

export interface ICustomStorage extends IStorage {
  hasItem(key: string): boolean
}

export interface ILockerConfig {
  driverNamespace?: string
  driverFallback?: DRIVERS | DRIVERS[]
  namespaceSeparator?: string
}

export interface IExpiryData {
  config?: IStorageSetConfig
  data: any
}

export interface IDriverType {
  storage: Driver
  type: string
}

results matching ""

    No results matching ""