Module

Localforage

Package
purescript-localforage
Repository
MVMS1994/purescript-localforage

#LocalforageConfig Source

type LocalforageConfig = { description :: String, driver :: LOCALFORAGE_DRIVERS, name :: String, size :: Int, storeName :: String, version :: Number }

#Localforage Source

#createInstance Source

createInstance :: LocalforageConfig -> Effect Localforage

Creates a new instance.

#getItem Source

getItem :: Localforage -> String -> Aff (Either Error Foreign)

Gets an item from the storage library. If the key does not exist, getItem will return null.

#setItem Source

setItem :: Localforage -> String -> Foreign -> Aff (Either Error Foreign)

Saves data to an offline store.

#removeItem Source

removeItem :: Localforage -> String -> Aff (Either Error Unit)

Removes the value of a key from the offline store.

#clear Source

clear :: Localforage -> Aff (Either Error Unit)

Removes every key from the database, returning it to a blank slate.

#keys Source

keys :: Localforage -> Aff (Either Error (Array String))

Get the list of all keys in the datastore.

Modules
Localforage