-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
[Feature Request] Add GetKeys()/RemoveKeys methods #124
Labels
Feature
New feature that will be added to the project
Resolved: Completed
The issue has been resolved
Comments
Pjotrtje
added
Feature Request
Request to add a new feature
Triage
Issue needs to be triaged
labels
Feb 14, 2021
Yes I need too |
koskila
added a commit
to koskila/LocalStorage
that referenced
this issue
Oct 10, 2021
…e keys and returning all keys from local storage
chrissainty
pushed a commit
that referenced
this issue
Oct 31, 2021
I need the enumeration via GetKeys as well |
Fixed in #162 |
chrissainty
added
Feature
New feature that will be added to the project
Resolved: Completed
The issue has been resolved
and removed
Feature Request
Request to add a new feature
Triage
Issue needs to be triaged
labels
Aug 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature
New feature that will be added to the project
Resolved: Completed
The issue has been resolved
Is your feature request related to a problem? Please describe.
I am porting a ReactJS website to Blazor and due to 'reasons' I store data with 'random' keys which I want to delete every x days. (this is vague I know). The easiest way is to compare all the keys in store with keys I 'allow' and then remove unwanted data by key.
Describe alternatives you've considered
I can fix this now by:
int Length();
-> foreach index ->string Key(int index);
-> and depending on an if call:void RemoveItem(string key);
So when I have 100 keys in store and I have to remove 50. I will have to make 1 + 100 + 50 = 151 calls to JS interop.
Describe the solution you'd like
If there were also
IEnumerable<string> GetKeys()
+void RemoveKeys(IEnumerable<string> keys)
Then I could achieve the same with just 2 calls. Which is nicer, more readable and faster.
Additional context
I describe it here as sync buth it would of cource also be nice in async.
FYI, code in my ReacttJS (TypeScript) app:
The text was updated successfully, but these errors were encountered: