ngx-cache
ngx-cache copied to clipboard
method to extract data written by native localStorage
I'm submitting a ... (check one with "x")
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[x ] Feature request
[ ] Documentation issue or request
Current behavior CacheService tries to extract data with meta info. If the data was written by localStorage then the cache service would crash.
Expected/desired behavior It will be better if we could have a method to extract data without meta info.
Minimal reproduction of the problem with instructions
- Write something using localStorage e.g. localStorage.setItem('test', 'test)
- Try to use CacheService to get 'test' i.e. cache.get('test')
What is the motivation / use case for changing the behavior? Cache Service should be backward compatible with localStorage
Environment
-
Angular version: X.Y.Z 6.0.2
-
Browser:
- [x ] Chrome (desktop) version 66
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
- For Tooling issues:
- Node version: 10.1.0
- Platform: Mac
- Others:
@zorrme sorry for the delay, had busy times. feel free to fire a PR and i'll approve.