feature: add support for named constructors#180
Merged
briancavalier merged 1 commit intocujojs:masterfrom Apr 10, 2016
Merged
Conversation
Member
|
Thanks, @OJezu! I should have time to look at this in the next couple days. |
Member
|
This looks good @OJezu. Could you add unit tests for the new namedConstructor feature? Thanks! |
Contributor
Author
|
@briancavalier I will get on those tests in two-three days. |
Member
|
Great, thank you. |
2c75f65 to
f2a3b61
Compare
f2a3b61 to
230d16a
Compare
Contributor
Author
|
@briancavalier I've added tests. I might have been a little drunk when writing them, so I am even more open to criticism than usual. I've also added some more recent versions of node.js to .travis.yml, I hope it's not a problem. |
Member
|
@OJezu great, thank you. I'll take a look in the next couple days. |
Member
|
Tests look good, @OJezu, thank you!
Not a problem at all. I appreciate it. |
Member
|
I'll get a release ready soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for named constructors in "create" factory.
I would love to add tests, but I did not find tests for the "create" factory itself.
This PR also allows "hack" where not-a-module is passed as module. It can be then used as factory. Maybe name of "constructorName" option should reflect this, and be "method" instead? And add "factory" as an alias for "module"?