title: Best way to add support for promises
body: <p>I want to convert an existing package that does not use standard node.js callback styles to support the existing callback style or promises. Consider something like:</p>
  
  <pre><code>api.getSomething({prop: ...}, callback)
  </code></pre>
  
  <p>It currently uses the <code>request</code> library and <code>api.getSomething</code> does something like this:</p>
  
  <pre><code>return request({
    url: ...,
    data: ...,
  }, callback)
  </code></pre>
  
  <p>The sort of high-level solution seems to me basically to check if <code>callback</code> is undefined and if so, return a promise. However, the use of the <code>request</code> library seems to complicate this, as I want a <code>request</code> library that returns a promise when callback isn't defined, and the request otherwise. </p>
  
  <p>Would it make sense to use the <code>request-promise</code> library and if the callback is supplied, call the callback in a <code>then</code>, and otherwise just return the data in the <code>then</code>?</p>