Forked from juliocesar/best-localStorage-polyfill-evar.js
Last active
August 29, 2015 14:01
-
-
Save orendon/408f18e5838d6b31a0f1 to your computer and use it in GitHub Desktop.
Revisions
-
orendon renamed this gist
May 22, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
orendon revised this gist
May 22, 2014 . 1 changed file with 1 addition and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,4 @@ if (!('localStorage' in window)) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, -
juliocesar revised this gist
Apr 19, 2011 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,10 @@ // if (!('localStorage' in window)) { if (!Modernizr.localstorage) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, removeItem : function(id) { return delete this._data[id]; }, clear : function() { return this._data = {}; } }; -
juliocesar revised this gist
Apr 18, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ if (!Modernizr.localstorage) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undef; }, removeItem : function(id) { return delete this._data[id]; }, clear : function() { return this._data = {}; } }; -
juliocesar revised this gist
Apr 18, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ // if (!('localStorage' in window)) { if (!Modernizr.localstorage) { var undef; window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, -
juliocesar revised this gist
Apr 18, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if (!Modernizr.localstorage) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, getItem : function(id) { return data.hasOwnProperty(id) ? data[id] : undef; }, removeItem : function(id) { return delete this._data[id]; }, clear : function() { return this._data = {}; } }; -
juliocesar revised this gist
Apr 18, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ if (!Modernizr.localstorage) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, getItem : function(id) { return this._data[id]; }, removeItem : function(id) { return delete this._data[id]; }, clear : function() { return this._data = {}; } -
juliocesar revised this gist
Apr 18, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ // casing the feature out, you give users in-memory (stale) storage instead? // If they close your application, they deserve to lose data anyway. // if (!('localStorage' in window)) { if (!Modernizr.localstorage) { window.localStorage = { _data : {}, -
juliocesar created this gist
Apr 18, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // I mean, seriously, localStorage is supported even by your mum. How about instead of // casing the feature out, you give users in-memory (stale) storage instead? // If they close your application, they deserve to lose data anyway. if (!Modernizr.localstorage) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = val; }, getItem : function(id) { return this._data[id]; }, removeItem : function(id) { return delete this._data[id]; }, clear : function() { return this._data = {}; } }; }