Skip to content
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

Shouldn't flush() remove only prefixed keys? #30

Open
Knagis opened this issue Feb 26, 2016 · 6 comments
Open

Shouldn't flush() remove only prefixed keys? #30

Knagis opened this issue Feb 26, 2016 · 6 comments

Comments

@Knagis
Copy link

Knagis commented Feb 26, 2016

getAll() returns only the prefixed keys, shouldn't flush() remove only those as well?

@tsironis
Copy link
Owner

Would it be useful to have both behaviours?

@Knagis
Copy link
Author

Knagis commented Feb 26, 2016

perhaps ignorePrefix (boolean) argument could be added both to getAll() and flush(). Or perhaps options with noPrefix field.

@tsironis
Copy link
Owner

@eavgerinos what do you think?

@avgerin0s
Copy link
Collaborator

@Knagis @tsironis You are right. flush should, by default, purge only lockr keys.

@tsironis
Copy link
Owner

@Knagis @eavgerinos Take a look at this one guys.

@ibc
Copy link

ibc commented Dec 6, 2017

Completely agreed. If I want to delete all the local storage I'd rather do localStorage.clear(); (rather than using a wrapped method that just does that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants