Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wrapGenerator.isGeneratorFunction #55

Merged
merged 3 commits into from
Nov 2, 2013

Conversation

benjamn
Copy link
Collaborator

@benjamn benjamn commented Nov 2, 2013

This is my current best effort to resolve #48.

These changes should also support implementations of isGeneratorFunction that don't have access to the GeneratorFunction constructor for direct comparison, such as https://github.com/visionmedia/co/blob/c247a120e3/index.js#L201-L211.

cc @TooTallNate @raynor

This hook will likely prove useful in more ways in the future, but for now
it's primarily useful for setting the .constructor property of the
generator function to the GeneratorFunction constructor in order to
support wrapGenerator.isGeneratorFunction.

Closes #48.
false
);

if (n.FunctionDeclaration.check(node)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: this case really deserves some comments.

benjamn added a commit that referenced this pull request Nov 2, 2013
Support wrapGenerator.isGeneratorFunction.
@benjamn benjamn merged commit 7374edd into master Nov 2, 2013
@benjamn benjamn deleted the GeneratorFunction-constructor branch November 2, 2013 19:41
@TooTallNate
Copy link

Wahoo!!! Thanks Ben!

On Saturday, November 2, 2013, Ben Newman wrote:

Merged #55 #55.


Reply to this email directly or view it on GitHubhttps://github.com//pull/55
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I detect for GeneratorFunctions in code?
2 participants