Skip to content

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