-
Notifications
You must be signed in to change notification settings - Fork 103
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
Readme v2 0 #83
Readme v2 0 #83
Conversation
Reformat image alignment. Removed "Known Issues" as it forms the incorrect thinking that stampit has problems. Moreover, if someone would need to browse issues he most likely knows what menu item to click on the right. :)
Rename the rest of 'state' and 'enclose' to 'refs' and 'init'.
Added v2 breaking changes description.
added "what is a stamp?" section
Removed `settings` parameter from `init()` function. There is no such thing AFAIK. :)
var b = stampit().enclose(function () { | ||
var a = 'b'; | ||
var b = stampit().init(function () { | ||
var priv = 'b'; | ||
this.getB = function () { | ||
return a; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? shouldn't it be return priv
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Spot on! Let me correct that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Fixing typo in a sample code.
|
||
Stampit mimics the behavior of `_.extend()`, `$.extend()` when you pass multiple objects into one of the prototype methods. In other words, it will copy all of the properties from those objects to the `.methods`, `.state`, or `.enclose` prototype for the stamp. The properties from later arguments in the list will override the same named properties of previously passed in objects. | ||
Stampit mimics the behavior of `_.extend()`, `$.extend()` when you pass multiple objects into one of the prototype methods. | ||
In other words, it will copy all of the properties from those objects to the `.methods`, `.refs`, or `.init` prototype for the stamp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention .props
here and remind the user that it will merge?
Mention `.props()` more. Fix mistakes of all sorts.
|
||
[Known Issues](https://github.com/dilvie/stampit/issues?state=open) | ||
There is a slight chance these changes affect your current codebase. If so, we would recommend you to update to v2 becuase it is more powerful. See [advances examples](https://github.com/ericelliott/stampit/blob/master/EXAMPLES.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean "advanced examples"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Minor updates to multiple places.
Describing new `stampit(options)` API. Fix examples. Do not use word "prototype" as too confusing in JS world. Use "stamp" instead. Plenty minor changes.
Ready to be merged to v2_0 I think. Check the latest changes please. |
|
||
Take n objects and add them to the state prototype. Changes `this` object. | ||
* @return {Object} stamp The stamp in question (`this`). | ||
It has alias - `stamp.state()`. Deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has an alias? =)
typos
@ericelliott, please review.
The bullet list of changes can be found in #71.