Skip to content

Conversation

@rboud506
Copy link
Collaborator

Update to readme

  • Update 1

@rboud506 rboud506 requested a review from code4ward April 17, 2025 23:58

## 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
Copy link
Owner

Choose a reason for hiding this comment

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

Yes much better

Copy link
Owner

@code4ward code4ward left a 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.
Copy link
Owner

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,
Copy link
Owner

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).
Copy link
Owner

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.

@rboud506 rboud506 merged commit bce4017 into master Apr 19, 2025
2 checks passed
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.

3 participants