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

Refs and props #60

Merged
merged 6 commits into from
May 24, 2015
Merged

Refs and props #60

merged 6 commits into from
May 24, 2015

Conversation

koresar
Copy link
Member

@koresar koresar commented May 6, 2015

state renamed to refs. New aliased fixed.state and state() were added for stamp.fixed.refs and stamp.refs().

Added stamp.fixed.props, stamp.props() and fourth parameter to the stampit() function.


function cloneAndExtend(fixed, extensionFunction, args) {
args = arguments.length > 3 ? slice(arguments, 2, arguments.length) : args;
var stamp = stampit(fixed.methods, fixed.state, fixed.enclose);
var stamp = stampit(fixed.methods, fixed.refs, fixed.enclose, fixed.props);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also support composing with legacy stamps that have fixed.state?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me add a unit test on that. It's better to be as backwards compatible as possible.

@koresar
Copy link
Member Author

koresar commented May 7, 2015

I've just addressed the stampit@1.1 compatibility. See the PR please.

@@ -3909,8 +3933,9 @@ function isStamp(obj) {
return (
Copy link
Contributor

Choose a reason for hiding this comment

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

This will return false for legacy stamps.

@koresar
Copy link
Member Author

koresar commented May 24, 2015

Fixed the mentioned issues. Thanks Eric.
I'm merging this in. It's time. :)

koresar added a commit that referenced this pull request May 24, 2015
@koresar koresar merged commit d2a45d5 into v2_0 May 24, 2015
@koresar koresar deleted the refs-and-props branch May 24, 2015 07:59
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.

None yet

2 participants