私はこのようなオブジェクトの動作を変更することに非常に注意しています。通常、LocalStorage(または使用)にラッパーを提供する方が良いです store.js または別のライブラリ)あなたが望む機能を提供するため。
あなたの場合 行う メソッドまたはプロパティをLocalStorageに追加したい場合は、コンストラクターのプロトタイプに追加することでこれを行うことができます。
typeof(localStorage.prototype); // "undefined"
localStorage.constructor // function Storage() { [native code] }
Storage.prototype.foo = function () { return 'foo'; }
// setting a method on the constructor allows each localStorage instance
// to inherit and use it
localstorage.foo() // 'foo'