{"id":17715669,"url":"https://github.com/jmjuanes/repstr","last_synced_at":"2025-06-12T03:09:22.758Z","repository":{"id":57149166,"uuid":"58263108","full_name":"jmjuanes/repstr","owner":"jmjuanes","description":"Replace in a string all the values provided in an object","archived":false,"fork":false,"pushed_at":"2017-05-05T14:23:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-02-26T09:03:40.756Z","etag":null,"topics":["nodejs","string","string-template","template-string"],"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/jmjuanes.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}},"created_at":"2016-05-07T11:30:10.000Z","updated_at":"2017-05-05T14:26:58.000Z","dependencies_parsed_at":"2022-09-06T12:52:54.072Z","dependency_job_id":null,"html_url":"https://github.com/jmjuanes/repstr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Frepstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Frepstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Frepstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Frepstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmjuanes","download_url":"https://codeload.github.com/jmjuanes/repstr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246458819,"owners_count":20780828,"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":["nodejs","string","string-template","template-string"],"created_at":"2024-10-25T12:06:41.175Z","updated_at":"2025-03-31T11:23:11.219Z","avatar_url":"https://github.com/jmjuanes.png","language":"JavaScript","readme":"# RepStr\n\n[![npm](https://img.shields.io/npm/v/repstr.svg?style=flat-square)](https://www.npmjs.com/package/repstr)\n[![npm](https://img.shields.io/npm/dt/repstr.svg?style=flat-square)](https://www.npmjs.com/package/repstr)\n\nReplace in a template string all values provided in an object\n\n## Installation\n\nUse [NPM](https://www.npmjs.com/package/repstr) to install **RepStr**:\n\n```\nnpm install repstr\n```\n\n## Usage\n\n```javascript\n//Import dependencies \nvar rep_str = require('repstr');\n\n//Compile the template string\nvar str = rep_str('My car is {color}', { color: 'blue'});\n\n//Display in console\nconsole.log(str); //-\u003e My car is blue\n```\n\n## API\n\n### rep_str(str, obj [, prefix][, suffix])\n\nReturn a new string. Accepts the following arguments:\n\n- `str`: template string.\n- `obj`: an object with all the keys to be replaced in your template string. \n- `prefix` **(optionally)**: a string with the prefix of the template variable. Default value is `{`.\n- `suffix` **(optionally)**: a string with the suffix of the template variable. Default value is `}`.\n\n## License\n\nUnder the [MIT LICENSE](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmjuanes%2Frepstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmjuanes%2Frepstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmjuanes%2Frepstr/lists"}