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

Items with store API key names are considered by key() #3

Merged
merged 2 commits into from
Dec 4, 2015

Conversation

semmel
Copy link
Contributor

@semmel semmel commented Dec 3, 2015

Previously the cloaked keys did not get "enumerated" by the key() method:

var storage = new MemoryStorage("my-app");
storage.setItem("getItem", "dummy value");
// returns 1
storage.length

🐛

// returns null
storage.key(0)

✔️

// returns "getItem"
storage.key(0)

… which support ES6 Proxies,

Warning: In JS environments without ES6 Proxies Object.keys(memoryStorage) retains the old behaviour in returning all API keys and all item keys
@semmel
Copy link
Contributor Author

semmel commented Dec 3, 2015

semmel@f989601
changes Object.keys(memoryStorage) to conform to Object.keys(localStorage) behaviour in JS environments that support ES6 Proxies.
See #2
Tests validated on Edge 13 and Firefox 44.

Download added a commit that referenced this pull request Dec 4, 2015
Items with store API key names are considered by key()
@Download Download merged commit e055257 into Download:master Dec 4, 2015
@Download
Copy link
Owner

Download commented Dec 4, 2015

Your fix is now available in release v0.10.0. Thanks for your help Matthias!

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