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

Add API to return all keys in store #136

Closed
dwhogg opened this issue Apr 14, 2014 · 4 comments
Closed

Add API to return all keys in store #136

dwhogg opened this issue Apr 14, 2014 · 4 comments

Comments

@dwhogg
Copy link

dwhogg commented Apr 14, 2014

Suggest having a call like keys(callback) to return an array of all keys in store. Would be useful in cases of trying to do housekeeping on the store if max size being reached.

@tofumatt tofumatt added this to the 1.1 getItems(); keys() milestone Apr 14, 2014
@tofumatt
Copy link
Member

I'm definitely cool with this; I'd like for 1.1 to support a lot of multi-key APIs; getItems and keys for sure, possibly setItems and removeItems as well.

@omggga
Copy link

omggga commented Oct 16, 2017

Hello from 2017!

Still not possible to remove several keys with one call?

Now making this one

Promise.all([
    localforage.removeItem(key1),
    localforage.removeItem(key2)
]).then(function(res) {
    console.log(res);
});

could be more beautiful if

localforage.removeItems([key1, key2, key3]).then(function() { } );

@thgreasi
Copy link
Member

https://github.com/localForage/localForage-removeItems :)

@omggga
Copy link

omggga commented Oct 17, 2017

Oh, thank you!

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

No branches or pull requests

4 participants