-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
First, I would like to thank you for assembling and publishing this project.
There are a couple small things that could be improved:
- Certain functions return what the library user is looking for directly, and other functions return a promise that the library user has to deal with. The library user has to read through the documentation more carefully to get it right.
- A couple of functions loop through the contents in the Javascript, which can be slow for large objects. This should only be done in the case of old, broken browsers (assuming they will be fixed, someday).
For 1, I can think of several possibilities, in increasing order of favorability:
- Break this into two projects (one for the functions that return promises and one for the functions that return the object directly) (not recommended)
- Rename the functions to indicate which ones return a promise (a little better but still not recommended)
- separate namespace or inner namespace for the functions that return a promise
For 2, I suggest the library checks the browser very carefully before actually looping through the contents in Javascript
A feature that could help some people is a pair of functions that provide the functionality of apache/pouchdb#2900, to convert between a Blob and a binary string that can be stored in the existing Web SQL implementations (including my Cordova sqlite plugin). I may put this in a PR if I get a chance sometime.
Metadata
Metadata
Assignees
Labels
No labels