title: How to save functions in localStorage API HTML5
body: <p>I am trying to save an array in <code>localStorage</code> but it contains functions (called promise) in an object of the array, but the problem appears when I convert array to string using <code>JSON.stringify</code>, apparently all functions are removed and when I parse string to <code>JSON Object</code> it comes without methods.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>/* Example code */
  
  var storage = {
   getListUsers: function(){
    return {
     name: 'name',
     age: 'age'
    }
   },
   active: true,
   data: []
  }
  
  var convert = JSON.stringify(storage);
  localStorage.setItem('data', convert);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Best regards.</p>