{"id":16920780,"url":"https://github.com/dherault/loopa","last_synced_at":"2025-08-26T01:03:45.554Z","repository":{"id":66316980,"uuid":"266608571","full_name":"dherault/loopa","owner":"dherault","description":"A loop for npm scripts","archived":false,"fork":false,"pushed_at":"2025-01-06T13:17:51.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T16:01:19.726Z","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/dherault.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,"zenodo":null}},"created_at":"2020-05-24T19:16:23.000Z","updated_at":"2025-01-06T13:17:55.000Z","dependencies_parsed_at":"2025-04-11T16:52:30.975Z","dependency_job_id":"a6909e6a-6b61-4812-8f3f-7ecaba06a4d5","html_url":"https://github.com/dherault/loopa","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"ab4c5b06d4f1a25f20ed34413fe25ee186d9da18"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dherault/loopa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Floopa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Floopa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Floopa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Floopa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dherault","download_url":"https://codeload.github.com/dherault/loopa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Floopa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265980964,"owners_count":23859555,"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-10-13T19:49:34.137Z","updated_at":"2025-07-23T10:04:48.096Z","avatar_url":"https://github.com/dherault.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loopa\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/loopa\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/loopa.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/npm/l/loopa.svg?style=flat-square\"\u003e\n  \u003ca href=\"#contributing\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nLoopa is a for loop for scripts. It will execute a command n times before exiting.\n\n## Installation\n\n`npm install --dev loopa` or `npx loopa`\n\n## Usage\n\n`loopa 3 echo \"a loop\"`\n\n```\na loop\na loop\na loop\n```\n\n`loopa 10 npm run some-script`\n\n```\n(some-script executed 10 times)\n```\n\n`loopa infinity echo \"an infinite loop\"`\n\n```\nan infinite loop\nan infinite loop\nan infinite loop\n...\n```\n\n`loopa 3 1000 echo \"one second interval\"`\n\n```\none second interval\none second interval\none second interval\n```\n\n\n## Usage with environment variables\n\nEnvironment variables should be escaped:\n\n`FOO=foo loopa 100 echo \\$FOO`\n\n```\nfoo\nfoo\nfoo\n...\n```\n\nIf you do not like escaping your environment variables you can do the following in your package.json file:\n\n```json\n{\n  \"scripts\": {\n    \"loop\": \"loopa 100 npm run echo-foo\",\n    \"echo-foo\": \"FOO=foo echo $FOO\"\n  }\n}\n```\n\n## Accessing the iteration variable\n\nThe iteration variable is available under the `$I` (or `\\$I`) env variable:\n\n`loopa 4 echo \\$I`\n\n```\n0\n1\n2\n3\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdherault%2Floopa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdherault%2Floopa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdherault%2Floopa/lists"}