Getting "key" item reveals the code instead of null
bver opened this issue · 5 comments
Hello,
it seems that fetching "key" on empty localStorage reveals the code of the db.prototype.key function:
global.localStorage = require('localStorage');
console.log(String(localStorage.getItem('key')));
prints
function (i) {
i = i || 0;
return Object.keys(this)[i];
}
(null should be expected).
I'll look at this tonight.
On Thursday, January 24, 2013, Pavel Suchmann wrote:
Hello,
it seems that fetching "key" on empty localStorage reveals the code of the
db.prototype.key function:global.localStorage = require('localStorage');
console.log(String(localStorage.getItem('key')));prints
function (i) {
i = i || 0;
return Object.keys(this)[i];
}(null should be expected).
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1.
Sent from Gmail Mobile
Tested Fixed. Please confirm.
:-D
I can confirm it was fixed. Thank you for this fix (and of course thank you for developing localStorage).
Pavel
ps: However, I have noticed this warning during the installation:
npm WARN package.json localStorage@1.0.1 No README.md file found!
fixed.
also: https://github.com/coolaj86/node-dom-storage
AJ ONeal
(317) 426-6525
On Sat, Jan 26, 2013 at 2:00 AM, Pavel Suchmann notifications@github.comwrote:
I can confirm it was fixed. Thank you for this fix (and of course thank
you for developing localStorage).
Pavelps: However, I have noticed this warning during the installation:
npm WARN package.json localStorage@1.0.1 No README.md file found!
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-12732916.
It was only a formal warning.
Anyway, thanks.