title: "this instanceof Cookies" in Source code of nodejs cookie middleware
body: <p>I am trying to understand how the cookie middleware works by looking at the source code. This middleware is going to replace the deprecated cookieParser().
  <a href="https://github.com/jed/cookies/blob/master/lib/cookies.js" rel="nofollow">https://github.com/jed/cookies/blob/master/lib/cookies.js</a></p>
  
  <p>Need some help in explaining the very first sentence:</p>
  
  <pre><code>...
  
  function Cookies(request, response, keys) {
    if (!(this instanceof Cookies)) return new Cookies(request, response, keys)
  
   ...
  } ...
  </code></pre>
  
  <ol>
  <li>What does "!(this instanceof Cookies)" do? Is it checking the "this" is the function itself?</li>
  <li>What is the purpose of this code? </li>
  </ol>
  
  <p>Thanks a lot!</p>