TypeScript
TypeScript copied to clipboard
Feature : Interpolate Strings
Description: Added a function to replace string inside { } with dynamic field values.
Use-case: This method helps when we use language translation in our application and want to replace dynamic values in our translated message
Example : Hello {name}, your age is {age} Output: Hello John Doe, your age is 30.
Hi @appgurueu @raklaptudirm please review this PR also once you free
Hi @appgurueu, I used this algo for injecting dynamic text in my email and messaging notifications usecase in my current project. This helps when our message is dependent on more than one language translations so that we can inject user details in our messages and email template translations.
this was the reason I contribute this small approach