title: reconstruct object functions retrieved from localStorage
body: <p>I'm using <code>JSON.stringify</code> and <code>JSON.parse</code> to store and retrieve objects from  <code>localStorage</code>. However, it appears that <code>JSON.stringify</code> strips out the instance functions from the object. Thus, after <code>JSON.parse</code>, I can no longer call <code>myObject.doSomething()</code>. I know that I can attach this function manually: <code>myObject.doSomething = MyClass.prototype.myFunction</code>, but that'll be troublesome if this action is repeated many times in the web app. How do people normally do this in JavaScript? </p>