title: How to replace Promise.defer with new Promise()
body: <p>So I see that <code>Promise.defer</code> is now deprecated and we are now supposed to use <code>new Promise</code> instead. I don't see how to do this however for this example?</p>
  
  <pre><code>var Promise = require('bluebird');
  var interval;
  
  var rollDice = function (resolver) {
    console.log("rolling");
    if (Math.floor(Math.random() * 10) == 7) {
      clearInterval(interval);
      resolver.resolve();
    }
  }
  
  var rollTill7 = function (ms) {
      var resolver = Promise.defer();
      interval = setInterval(function(){rollDice(resolver);},ms);
      return resolver.promise;
  }
  
  rollTill7(100).then(function(){
      console.log("rolled a 7");
  });
  </code></pre>