title: How to get the class name of an Object in Node JS
body: <p>Question is very Simple. If you instance, for example, a Buffer you do:</p>
  
  <pre><code>b = new Buffer(0);
  </code></pre>
  
  <p>then you check the type:</p>
  
  <pre><code>typeof b;
  </code></pre>
  
  <p>The result is 'Object', but I want to know it is a Buffer.</p>
  
  <p>If you made this in the node console you get it:</p>
  
  <blockquote>
    <p>&gt;b = new Buffer(1024);<br>
    &gt;typeof b<br>
    'object'<br>
    &gt; b<br>
    &lt;Buffer ...&gt;</p>
  </blockquote>
  
  <p>So, some how the console knows that b is a Buffer. </p>