Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Added support for nested properties in an object#10

Open
Ahmad44452 wants to merge 2 commits into
tjcafferkey:masterfrom
Ahmad44452:master
Open

Added support for nested properties in an object#10
Ahmad44452 wants to merge 2 commits into
tjcafferkey:masterfrom
Ahmad44452:master

Conversation

@Ahmad44452
Copy link
Copy Markdown

Added the functionality to inject nested properties from an object. For example, for an object {platform: { username: "Ahmad" } } and the string "My name is {platform.username}" the output will be "My name is Ahmad"

Added the functionality to inject nested properties from an object. For example, for an object
{platform: { username: "Ahmad" } } and the string "My name is {platform.username}" the output will be "My name is Ahmad"
Comment thread test/test.spec.js Outdated

it("replace object values based on one nested key", function() {
var str = stringInject("My username is {profile.username}", { profile: { username: "tjcafferkey" } });
console.log(str)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can you remove this console.log please

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes. Removed the unnecessary log in the commit c0698b0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants