softvar / secure-ls

:lock: Secure localStorage data with high level of encryption and data compression
http://softvar.github.io/secure-ls
MIT License
646 stars 82 forks source link

[FEATURE] Comply with Storage API for drop-in replacement of a unencrypted localStorage #37

Open bestmazzo opened 4 years ago

bestmazzo commented 4 years ago

-Desired behavior In order to simplify secure-ls adoption in place of a unencrypted storage, if it could comply the Storage API https://developer.mozilla.org/en-US/docs/Web/API/Storage this could make a developer life much easier, and allow better third party integration.

This would require implementing the five Storage interface methods: Storage.key() Storage.getItem() Storage.setItem() Storage.removeItem() Storage.clear()

or just remap current method names

softvar commented 4 years ago

Hey @bestmazzo , I gave it a thought and it appears a valid point to me. Migration would be much easier in case of same methods.

Will try to ship this feature in next release.