addyosmani / polymer-localforage

A Polymer element for Mozilla's localForage (async storage via IndexedDB or WebSQL)
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

adapt iron localstorage interface #4

Closed gronke closed 8 years ago

gronke commented 8 years ago

As mentioned in #3 this PR adapts the interface of iron-localstorage and transfers unit tests. Due to the async behavior of localForage the two elements can't share the same tests and the exact interface, but they are replaceable on a WebComponent level.

@addyosmani do you see chances to use Promises in iron-localstorage too, so that this repo can run the exact same test files?

gronke commented 8 years ago

@addyosmani what is your opinion on this promisified interface of iron-localstorage? Due to the async nature of localforage it was not possible to keep the sync interface and with that the unit tests could also not be copied from iron-localstorage without small changes.

addyosmani commented 8 years ago

Landing as is as on further review, I'm fine with us moving in this direction.