-
Notifications
You must be signed in to change notification settings - Fork 0
Readme edit ron #2
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
Conversation
|
|
||
| ## Introduction | ||
| In simple terms JSOI is designed specifically for templating javascript objects. It is | ||
| In simple terms, JSOI is designed specifically to template JavaScript objects. It is |
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.
Yes much better
code4ward
left a comment
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.
What an improvement! Thanks Ron. No problems found just some questions. Also, I think I am going to create automatic looping. Create a new option for this. Just a heads up, we will probably need to revisit how we explain dealing with key order problems.
I just have one comment for your review, I am good on what ever you choose.
|
|
||
| After you have an instance of ```ObjectInterpolator``` you will simply invoke the ```interpolate``` method. | ||
| on the object | ||
| After you have an instance of ```ObjectInterpolator```, you will simply invoke the ```interpolate``` method on the object. |
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.
Should this say "you can invoke"
|
|
||
| #### Primitive types | ||
| JSOI supports type conversion on most javascript primitive types (except ```undefined```). Support, | ||
| JSOI supports type conversion on most JavaScript primitive types (except ```undefined```). Support, |
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.
Yes - thanks!!
| JSOI processes replacement params in order of key iteration. This has the unintended consequence of creating a dependency | ||
| on key order in the replacement object. There are two approaches to dealing with key order, the first is to interpolate in | ||
| a loop the second is to provide the order in which you would like to process the object keys (see [Declare keys to process and processing order](#Declare-keys-to-process-and-processing-order). | ||
| a loop, the second is to provide the order in which you would like to process the object keys (see [Declare keys to process and processing order](#Declare-keys-to-process-and-processing-order). |
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.
Can we mention a trade off here. The point here is that providing the order of keys will be more efficient then a loop. However, a loop will be more maintainable and generally be more robust.
Update to readme