{"id":14986801,"url":"https://github.com/helpers/handlebars-helper-repeat","last_synced_at":"2025-10-07T06:55:19.537Z","repository":{"id":57151574,"uuid":"12878009","full_name":"helpers/handlebars-helper-repeat","owner":"helpers","description":"{{repeat}} handlebars helper, for duplicating a block of content n times.","archived":false,"fork":false,"pushed_at":"2019-05-31T23:45:29.000Z","size":41,"stargazers_count":27,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-27T05:32:01.238Z","etag":null,"topics":["engine","handlebars","helper","javascript","jonschlinkert","node","nodejs","repeat","repeat-string","template"],"latest_commit_sha":null,"homepage":"https://github.com/helpers","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/helpers.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":"2013-09-16T20:30:30.000Z","updated_at":"2024-02-09T08:29:25.000Z","dependencies_parsed_at":"2022-08-31T03:41:34.549Z","dependency_job_id":null,"html_url":"https://github.com/helpers/handlebars-helper-repeat","commit_stats":null,"previous_names":["helpers/helper-repeat"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/helpers/handlebars-helper-repeat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhandlebars-helper-repeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhandlebars-helper-repeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhandlebars-helper-repeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhandlebars-helper-repeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helpers","download_url":"https://codeload.github.com/helpers/handlebars-helper-repeat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhandlebars-helper-repeat/sbom","scorecard":{"id":460683,"data":{"date":"2025-08-11","repo":{"name":"github.com/helpers/handlebars-helper-repeat","commit":"df29b290547e94f03e574a93496e85adda0fa989"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/helpers/.github/SECURITY.md:1","Info: Found linked content: github.com/helpers/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/helpers/.github/SECURITY.md:1","Info: Found text in security policy: github.com/helpers/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T11:04:04.911Z","repository_id":57151574,"created_at":"2025-08-19T11:04:04.911Z","updated_at":"2025-08-19T11:04:04.911Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734411,"owners_count":26036404,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["engine","handlebars","helper","javascript","jonschlinkert","node","nodejs","repeat","repeat-string","template"],"created_at":"2024-09-24T14:13:34.358Z","updated_at":"2025-10-07T06:55:19.521Z","avatar_url":"https://github.com/helpers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# handlebars-helper-repeat [![NPM version](https://img.shields.io/npm/v/handlebars-helper-repeat.svg?style=flat)](https://www.npmjs.com/package/handlebars-helper-repeat) [![NPM monthly downloads](https://img.shields.io/npm/dm/handlebars-helper-repeat.svg?style=flat)](https://npmjs.org/package/handlebars-helper-repeat) [![NPM total downloads](https://img.shields.io/npm/dt/handlebars-helper-repeat.svg?style=flat)](https://npmjs.org/package/handlebars-helper-repeat) [![Linux Build Status](https://img.shields.io/travis/helpers/handlebars-helper-repeat.svg?style=flat\u0026label=Travis)](https://travis-ci.org/helpers/handlebars-helper-repeat)\n\n\u003e Handlebars block helper for repeating whatever is inside the block _n_ times.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save handlebars-helper-repeat\n```\n\nIf you find a bug or have a feature request, [please create an issue](https://github.com/helpers/handlebars-helper-repeat/issues).\n\n## Usage\n\n```js\nconst repeat = require('handlebars-helper-repeat');\nhandlebars.registerHelper('repeat', repeat);\n```\n\n## Register with handlebars\n\n```js\nconst handlebars = require('handlebars');\n\n// 2. register the helper, name it whatever you want\nhandlebars.registerHelper('repeat', require('handlebars-helper-repeat'));\n\n// 3. register some partials\nhandlebars.registerPartial('button', '\u003cbutton\u003e{{text}}\u003c/button\u003e');\n\n// 4. use in templates\nconst fn = handlebars.compile('{{#repeat 2}}{{\u003e button }}{{/repeat}}');\n\nconsole.log(fn({text: 'Click me!'}));\n//=\u003e '\u003cbutton\u003eClick me!\u003c/button\u003e\u003cbutton\u003eClick me!\u003c/button\u003e'\n```\n\n## Usage Examples\n\n**Private variables**\n\nA few private variables are exposed to blocks:\n\n* `count` the total number of blocks being generated\n* `index` the index of the current block\n* `start` the start number to use instead of zero. Basically `index + start`\n\nExample:\n\n```handlebars\n{{#repeat count=2 start=17}}\n  {{\u003e button }}\u003cspan\u003e{{@index}}\u003c/span\u003e\n{{else}}\n  Nothing :(\n{{/repeat}}\n```\nResults in something like:\n\n```html\n\u003cbutton\u003eClick me!\u003c/button\u003e\u003cspan\u003e17\u003c/span\u003e\n\u003cbutton\u003eClick me!\u003c/button\u003e\u003cspan\u003e18\u003c/span\u003e\n```\n\n**Index**\n\nOutput the index of the current block:\n\n```handlebars\n{{#repeat 2}}\n\u003cdiv id=\"{{@index}}\"\u003e {{\u003e button }} \u003c/div\u003e\n{{/repeat}}\n```\n\nResults in something like:\n\n```html\n\u003cdiv id=\"0\"\u003e \u003cbutton\u003eClick me\u003c/button\u003e \u003c/div\u003e\n\u003cdiv id=\"1\"\u003e \u003cbutton\u003eClick me\u003c/button\u003e \u003c/div\u003e\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [handlebars-helpers](https://www.npmjs.com/package/handlebars-helpers): More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate… [more](https://github.com/helpers/handlebars-helpers) | [homepage](https://github.com/helpers/handlebars-helpers \"More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.\")\n* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string \"Repeat the given string n times. Fastest implementation for repeating a string.\")\n* [template-helpers](https://www.npmjs.com/package/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or… [more](https://github.com/jonschlinkert/template-helpers) | [homepage](https://github.com/jonschlinkert/template-helpers \"Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 23, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpers%2Fhandlebars-helper-repeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelpers%2Fhandlebars-helper-repeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpers%2Fhandlebars-helper-repeat/lists"}