{"id":18743297,"url":"https://github.com/rimiti/stimmy","last_synced_at":"2025-08-12T18:39:33.723Z","repository":{"id":28903424,"uuid":"117364207","full_name":"rimiti/stimmy","owner":"rimiti","description":":sunglasses: Replace your string variables by your values easily.","archived":false,"fork":false,"pushed_at":"2023-04-25T13:50:54.000Z","size":578,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T15:48:14.407Z","etag":null,"topics":["es6","flowtype","javascript","string","variable"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rimiti.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":"2018-01-13T17:38:36.000Z","updated_at":"2025-03-10T13:34:02.000Z","dependencies_parsed_at":"2024-11-07T16:11:34.496Z","dependency_job_id":"fd31656f-1851-4bc6-a2f0-0b86c6389eab","html_url":"https://github.com/rimiti/stimmy","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rimiti%2Fstimmy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rimiti%2Fstimmy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rimiti%2Fstimmy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rimiti%2Fstimmy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rimiti","download_url":"https://codeload.github.com/rimiti/stimmy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248635979,"owners_count":21137347,"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":["es6","flowtype","javascript","string","variable"],"created_at":"2024-11-07T16:10:58.139Z","updated_at":"2025-04-12T21:32:16.163Z","avatar_url":"https://github.com/rimiti.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stimmy\n\n[![Build][build-badge]][build]\n[![License][license-badge]][license]\n[![PRs Welcome][prs-badge]][prs]\n\n\n## Description\n\nThis module provides a string variables replacer.\n\n## Install\n\n```bash\n$ yarn add @rimiti/stimmy\n```\n\n## Features\n\n- Can replace variables from an object.\n- Can replace variables from an array.\n\n\n## Documentation\n\n* [From an array](#fromArray)\n* [From an object](#fromObject)\n\n\n## Examples\n\n**From import**\n```javascript\nimport { stimmy } from '@rimiti/stimmy';\n```\n\n**From require**\n```javascript\nconst { stimmy } = require('@rimiti/stimmy');\n```\n**init pattern**\n```javascript\n// As default, use the {myVariable} pattern\nconst replacer = stimmy();\n\n// If you want to customized default pattern (ex: {{myVariable}}\nconst replacer = stimmy('{{', '}}')\n```\n\n\u003ca name=\"fromArray\"/\u003e\n\n### From an array\n\n```javascript\nconst str = replacer('This {0} is {1}!', ['module', 'awesome']);\n// This module is awesome!\n```\n\n```javascript\nconst str = replacer('{0}% of code coverage, it\\'s {1}...', [100, 'so amazing']);\n// 100% of code coverage, it's so amazing...\n```\n\n\u003ca name=\"fromObject\"/\u003e\n\n### From an object\n\n```javascript\nconst str = replacer('{timmy} My hobby is {hobby}...', {timmy: 'Timmmmmmmyy !!', hobby: 'running'});\n// Timmmmmmmyy !! My hobby is running...\n```\n\n```javascript\nconst str = replacer('My name is {name}, I\\'m {age}.', {name: 'stimmy', age: 25});\n// My name is stimmy, I'm 25.\n```\n\n## Scripts\n\nRun using yarn run `\u003cscript\u003e` command.\n\n    clean       - Remove temporarily folders.\n    build       - Compile source files.\n    build:watch - Interactive watch mode, compile sources on change.\n    lint        - Lint source files.\n    lint:fix    - Fix lint source files.\n    test        - Runs all tests with coverage.\n    test:watch  - Interactive watch mode, runs tests on change.\n\n\n## License\nMIT © [Dimitri DO BAIRRO](https://github.com/rimiti/stimmy/blob/master/LICENSE)\n\n[build-badge]: https://github.com/rimiti/stimmy/workflows/Test/badge.svg\n[build]: https://github.com/rimiti/stimmy/actions?query=workflow%3ATest+branch%3Amaster\n[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\n[license]: https://github.com/rimiti/stimmy/blob/master/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimiti%2Fstimmy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frimiti%2Fstimmy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimiti%2Fstimmy/lists"}