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
Add support for custom storage type #10
Comments
@fonkgoku you can actually replace the localstorage and write a wrapper that uses the local storage interface.
|
Sorry I didn't get. Do you mean that I can write custom wrapper?
|
@zorianiy-sapfir yes |
Will this be merged into the main repo at some point or is it a temp fix waiting for #11 ? |
@PierreProdel IMO there is no need to merge anything. I would close this issue since exchanging the storage is already possible. lib = new SecureLS();
lib.ls = {
setItem: (key, value) => {},
getItem: (key) => {},
removeItem: (key) => {},
get length() {},
key: (i) => {}
}; |
Adding support for a different storage type like sessionStorage or a custom solution might be useful. I made and tested the changes in a fork, PR coming soon.
The text was updated successfully, but these errors were encountered: