Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non-JSON values gracefully #4

Closed
passy opened this issue Jul 24, 2013 · 2 comments
Closed

Handle non-JSON values gracefully #4

passy opened this issue Jul 24, 2013 · 2 comments

Comments

@passy
Copy link
Contributor

passy commented Jul 24, 2013

ngStorage currently demands control over the complete localStroage. This is problematic if you use other plugins that store data in it, especially if this data is not valid JSON.

Adding a try/catch block around JSON.parse already help a lot, but I'm not sure if this in line with your design decisions. Should it just silently ignore invalid values, print a warning or anything like that?

@gsklee
Copy link
Owner

gsklee commented Jul 24, 2013

Hi @passy, this has just been addressed in 8e34a23 (and #3); essentially we're establishing a namespace inside the Storage and will only be interacting with values under this namespace from version 0.2.1 onwards. Lemme know if this didn't fully address your concerns.

@passy
Copy link
Contributor Author

passy commented Jul 24, 2013

It does! Fantastic! The prefixing is definitely a great addition, thanks! 🍰

@passy passy closed this as completed Jul 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants