funkensturm / ember-local-storage

The addon provides a storageFor computed property that returns a proxy and persists the changes to localStorage or sessionStorage. It ships with an ember-data adapter.
https://www.funkensturm.com/ember-local-storage/
MIT License
218 stars 76 forks source link

Add a resetToInitialState method #249

Closed dja closed 7 years ago

dja commented 7 years ago

From my understanding, you would need to call clear() and reset() on a StorageObject to reset it to its initial state.. Is there a more optimal way we could do this in just one method?

fsmanuel commented 7 years ago

@dja just reset() should work. Why do you think that you need clear() before?

dja commented 7 years ago

Awesome, nevermind that then - I thought clear was doing something separate from how it's explained in the readme as removing content from xStorage.