Any reason why $persist does not have a delete? #1972
Replies: 2 comments 3 replies
-
I don't think there are specific reasons. Do you have a specific use case and a syntax in mind? |
Beta Was this translation helpful? Give feedback.
-
There are certain situations where we don't need to mutate or set a value in local storage, but we want to be able to delete it completely. It could be due to migrations to a new version of the software and we want to make sure certain values are not there. I know I can go directly to local storage. But if we are going to be providing an abstraction to persistence in local storage. Might as well provide a full abstraction. This also helps when doing unit tests as I can mock the persistence library methods instead of the local storage objects. I would suggest that since we already provide a way to do persistence (set) and set with alias, why not include an |
Beta Was this translation helpful? Give feedback.
-
Is there any reason why the $persist plugin doesn't sport a
delete()
capability?Beta Was this translation helpful? Give feedback.
All reactions