title: Distinguish between Integer and Double in V8
body: <p>In my implementation I provide a function to JavaScript that accepts a parameter. </p>
  
  <pre><code>v8::Handle&lt;v8::Value&gt; TableGetValueIdForValue(const v8::Arguments&amp; args) {
    v8::Isolate* isolate = v8::Isolate::GetCurrent();
    v8::HandleScope handle_scope(isolate);
  
    auto val = args[1];
  
    if (val-&gt;IsNumber()) {
  
      auto num = val-&gt;ToNumber();
      // How to check if Int or Double    
  
    } else { 
       // val == string 
    }
  }
  </code></pre>
  
  <p>Now this parameter can have basically any type. As I support Int, Float and String I want to efficiently check for these types. Using <code>IsNumber()</code> and <code>IsStringObject()</code> I can make sure that the objects are numberish or a string.</p>
  
  <p>But now I need to differentiate between an integer value and a float. What is the best way to perform this test? Is there a way to call / use the <code>typeof</code> function exposed to JS?</p>