Last active
August 29, 2015 14:25
-
-
Save diegocasmo/5df854f8d34e8acf24d6 to your computer and use it in GitHub Desktop.
Revisions
-
diegocasmo revised this gist
Jul 24, 2015 . 1 changed file with 3 additions and 3 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,7 +1,7 @@ var total = 0; for (var key in localStorage) { var keySize = ((localStorage[key].length * 2) / 1024 / 1024).toFixed(2); console.log(key + '=' + keySize + ' MB'); total += parseFloat(keySize); } console.log('total=' + total.toFixed(2) + ' MB'); -
diegocasmo revised this gist
Jul 24, 2015 . 1 changed file with 4 additions and 3 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,6 +1,7 @@ var total = 0; for (var x in localStorage) { var keySize = ((localStorage[x].length * 2) / 1024 / 1024).toFixed(2); console.log(x + '=' + keySize + ' MB'); total += parseFloat(keySize); } console.log('total=' + total.toFixed(2) + ' MB'); -
diegocasmo created this gist
Jul 24, 2015 .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,6 @@ var total = 0; for (var x in localStorage) { console.log(x + '=' + ((localStorage[x].length * 2) / 1024 / 1024).toFixed(2) + ' MB'); total += parseFloat(((localStorage[x].length * 2) / 1024 / 1024).toFixed(2)); } console.log('total=' + total + ' MB');