Skip to content

Latest commit

 

History

History

lib

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Storage API Documentation

key: async (index) =>

Get key by index number

  • Parameters: indexnumber — - Index
  • Returns: Promise<string> — - Key

get: async (key, defaultValue, json = true) =>

Get value

  • Parameters:
    • keystring
    • defaultValue*
    • [json=true]boolean — - Convert value to JSON
  • Returns: Promise<*> — - Value

set: async (key, value, json = true) =>

Set value

  • Parameters:
    • keystring
    • value*
    • [json=true]boolean — - Convert value to JSON
  • Returns: Promise<boolean> — - Returns false on failure

remove: async (key) =>

Remove value

  • Parameters: keystring
  • Returns: Promise<void>

clear: async () =>

Clear all keys and values

  • Returns: Promise<void>

length: async () =>

Get the number of keys

  • Returns: Promise<number>

size: () =>

Get the storage size

  • Returns: number