title: How to create selector like jQuery with additional functions?
body: <p>I am trying to understand  how to work jQuery and other libraries. I would like to know how to create a selector with this format:</p>
  
  <pre><code>$("#selector").get(); 
  </code></pre>
  
  <p>By the moment, I am trying the next, but i don't know how to run internal functions (get(), set()):</p>
  
  <pre><code>var $ = (function() {
  
      var jQuery = {
          get: function() {
              console.log("get() function!!");
              return this;
          },
          set: function() {
              console.log("set() function!!");
              return this;
          }
      };
  
      return function(el) {
          return document.querySelector(el);
      }       
  })();
  </code></pre>
  
  <p>I have read something about modular pattern design in JavaScript, but I don't understand all.</p>