      } else {
        reject(&#39;Greeting &#39; + name + &#39; is not allowed.&#39;);
      }
    }, 1000);
  });
}

var promise = asyncGreet(&#39;Robin Hood&#39;);
promise.then(function(greeting) {
  alert(&#39;Success: &#39; + greeting);
}, function(reason) {
  alert(&#39;Failed: &#39; + reason);
});
</code></pre>
<p>Note: progress/notify callbacks are not currently supported via the ES6-style interface.</p>
<p>However, the more traditional CommonJS-style usage is still available, and documented below.<