kriskowal/q — pull request #288 by andywingo (2013-05-08 14:37:43+00:00)
Title: Update Q.async to work with current ES6 generators

ES6 generators are slightly different from what has been shipped in
SpiderMonkey. For our purposes, the differences are:

* they use function* as a token;
* they box their return value in a { value: , done: }
object; and
* they can return a value.

They are close enough to SpiderMonkey that Q.async can support both.
This commit checks for legacy generators at Q startup, and expects
unboxed values in that case.

This commit also updates the examples. In particular, the wishful
thinking and shim examples go away, as they are handled naturally with
the new specification. A copy of the legacy examples has been moved to
the examples/async-generators/js-1.7/ folder.