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

editing purge and purgeAll to return thenable #119

Closed
wants to merge 1 commit into from

Conversation

eclifford
Copy link

@eclifford eclifford commented Jun 14, 2016

I ran into the situation where I needed to know when the underlying calls to removeItem were finished executing (since they are async). My PR simply propagates the thenable resolution once all removeItem's resolve. With this update calls to purge and purgeAll are thenable.

@rt2zz
Copy link
Owner

rt2zz commented Aug 17, 2016

This is definitely desired functionality.

Concerns:

  1. should also support callbacks
  2. I dont think the purgeAll implementation works as it relies on getAllKeys returning a promise

@rt2zz rt2zz mentioned this pull request Aug 28, 2016
Merged
@rt2zz
Copy link
Owner

rt2zz commented Aug 28, 2016

@eclifford thanks for the work! I adapted it and applied it to the coming v4 PR.

Regarding my comments, I have decided callbacks is a feature that can be added later, and I updated the default getAllKeys implementation to support promises.

@rt2zz rt2zz closed this Aug 28, 2016
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

Successfully merging this pull request may close these issues.

2 participants