Get key by index number
- Parameters:
index
—number
— - Index - Returns:
Promise<string>
— - Key
Get value
- Parameters:
key
—string
—defaultValue
—*
—[json=true]
—boolean
— - Convert value to JSON
- Returns:
Promise<*>
— - Value
Set value
- Parameters:
key
—string
—value
—*
—[json=true]
—boolean
— - Convert value to JSON
- Returns:
Promise<boolean>
— - Returns false on failure
Remove value
- Parameters:
key
—string
— - Returns:
Promise<void>
—
Clear all keys and values
- Returns:
Promise<void>
—
Get the number of keys
- Returns:
Promise<number>
—
Get the storage size
- Returns:
number
—