title: How can I detect if an object is an interval/timeout?
body: <p>For <strong>node.js</strong></p>
  
  <pre><code>var timer = setInterval(function(){console.log('hi')},1000);
  var notATimer = {};
  var number = 2;
  
  detectTimer(timer) //returns true
  detectTimer(notATimer) //returns false
  detectTimer(number) //returns false
  </code></pre>
  
  <p>Is there any way to reliably determine whether or not an object is an interval?
  Also, bonus points if the way to detect it also works for setTimeout.</p>