Having skimmed the code I think your promise is just running the localStorage operations inside a wrapper? That just means that they are deferred a tick rather than truly Async and only one will happen one at a time and the read/write will happen all at once. This seems to just make it slower to read and write from localStorage. I would also argue that makes it hard to know which order things will happen in and what the state of a key actually is. Would be tricky if you mixed it with your own or library code that used localStorage directly.
I love the documentation and the error message etc, I'm just not sure what the use case is as if I just wrote localStorage operations it would be faster and would block the main thread for the same amount of time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Having skimmed the code I think your promise is just running the localStorage operations inside a wrapper? That just means that they are deferred a
tick
rather than truly Async and only one will happen one at a time and the read/write will happen all at once. This seems to just make it slower to read and write from localStorage. I would also argue that makes it hard to know which order things will happen in and what the state of a key actually is. Would be tricky if you mixed it with your own or library code that used localStorage directly.I love the documentation and the error message etc, I'm just not sure what the use case is as if I just wrote localStorage operations it would be faster and would block the main thread for the same amount of time.