Skip to content
gdotdesign edited this page Nov 3, 2014 · 2 revisions

The localStorage wrapper is available with the Fron::Storage::LocalStorage (documentation) module. The only difference is that is saves the given data with JSON so there is no need to convert.

storage = Fron::Storage::LocalStorage

# Get item
storage.get 'item'

# Set item
storage.set 'item', 'data'

# Remove item
storage.remove 'item'

# Clear (remove all items)
storage.clear

# Get all items
stroage.all
Clone this wiki locally