Description
Hey,
Well, I wanted to share indexedDB data between two different apps. One is in angular but the other is not. My solution was to use LocalForage, given you based your work on it.
But saving a JS object with LocalForage and then using or updating it with this library didn't work, even though the database and table were the same. After some analysis, I noticed the cause to be that you wrap the object in a value
property.
Whether you want your library to be compatible with LocalForage is another discussion, but I guess you may want to handle the errors more precisely.
Setup
Save a JS object, but don't wrap it in another object with the value
property. Then make LocalStorage get or update this object.
Current behavior
getItem
observable returns null
.
setItem
observable returns the error (I even thought it was related to #47):
IndexedDB setter issue : Key already exists in the object store.
More precise behavior
getItem
observable throws an error or actually reads the current value.
setItem
observable returns a more descriptive error or normalizes the structure to what it should be.