{"id":20046422,"url":"https://github.com/aneldev/dyna-template-string","last_synced_at":"2025-07-07T00:06:51.382Z","repository":{"id":87578061,"uuid":"328921577","full_name":"aneldev/dyna-template-string","owner":"aneldev","description":"The dyna-template-string engine for custom test templates and variables","archived":false,"fork":false,"pushed_at":"2021-01-12T08:35:39.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T07:48:41.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aneldev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-12T08:34:44.000Z","updated_at":"2021-01-12T08:35:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc7301a1-90d1-46f8-8f5e-4f7ba3c197be","html_url":"https://github.com/aneldev/dyna-template-string","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aneldev/dyna-template-string","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-template-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-template-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-template-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-template-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aneldev","download_url":"https://codeload.github.com/aneldev/dyna-template-string/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-template-string/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263991446,"owners_count":23540665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T11:23:44.978Z","updated_at":"2025-07-07T00:06:51.366Z","avatar_url":"https://github.com/aneldev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynaTemplateString\n\nWorks like [JS Template String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals).\n\nThe test is string, you don't use the ``` symbol and the variables are passed as a object.\n\n# Example\n\n```\ndynaTemplateString({\n  text: 'Hello ${name}! How are you ${name} today?',\n  variables: {\n    name: 'John',\n  },\n})\n```\nReturns:\n```\nHello John! How are you John today?\n```\n\nIf the variable is not passed in `variables` object the `${varName}` will remain on the output, indicating that this variable is missing.\n\nFor Instance\n\n```\ndynaTemplateString({\n  text: 'Hello ${salutation} ${firstName} ${lastName}.',\n  variables: {\n    salutation: 'Mr',\n    lastName: 'Smith',\n    // firstName is missing!\n  },\n})\n```\nReturns:\n```\nHello Mr ${firstName} Smith.\n```\n\n\n# API\n\n```\nexport const dynaTemplateString = (\n  args: {\n    text: string;\n    variables: {\n      [variableName: string]: string;\n    };\n  },\n): string\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneldev%2Fdyna-template-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneldev%2Fdyna-template-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneldev%2Fdyna-template-string/lists"}