title: What kind of JS pattern is this example?
body: <p>I was using a jQuery Framework and found code which is in the way below. Now: I understand that there is an IIFE and the return is giving an object containing several JSON/Functions. But I don't understand why the two vars are above the return? Is this some kind of private-member pattern because it cannot be accessed using the generator-variable? What kind of pattern is this? Thanks!!</p>
  
  <pre><code>$(document).ready(function() {
      var generator = (function() {
  
          var _eventhandler = function() {
              $('#id').keyup(function() {
                  generator.validate(true);
              });
          }
  
          var _isAllowed= function() {
              return true;
          };
  
          return {
              config: {
                  //config data
              },
              init: function() {
                  console.log("init generator...");
              }
              validate: function {
                  return true;
              }
          }
      }());
  
      generator.init();
  });
  </code></pre>