{"id":24290525,"url":"https://github.com/dutu/semaphore","last_synced_at":"2025-10-29T22:35:50.981Z","repository":{"id":174634860,"uuid":"652530757","full_name":"dutu/semaphore","owner":"dutu","description":"A simple ES6 semaphore implementation","archived":false,"fork":false,"pushed_at":"2023-06-12T10:11:45.000Z","size":7646,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T11:59:28.654Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dutu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-12T09:03:24.000Z","updated_at":"2023-06-12T09:06:38.000Z","dependencies_parsed_at":"2023-07-09T19:37:49.612Z","dependency_job_id":null,"html_url":"https://github.com/dutu/semaphore","commit_stats":null,"previous_names":["dutu/semaphore"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fsemaphore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fsemaphore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fsemaphore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fsemaphore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dutu","download_url":"https://codeload.github.com/dutu/semaphore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242135162,"owners_count":20077403,"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":"2025-01-16T11:53:07.239Z","updated_at":"2025-10-29T22:35:50.848Z","avatar_url":"https://github.com/dutu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dutu/semaphore/main.yml?branch=master)\n\n# semaphore\n\nA simple ES6 semaphore implementation for managing concurrent access to a resource.\n\n## Installation\n\n```bash\nyarn add @dutu/semaphore@github:dutu/semaphore\n```\n\n## Usage\n```js\nimport Semaphore from '@dutu/semaphore'\n\nconst sem = new Semaphore()\n\nasync function task() {\n  console.log(\"Waiting for semaphore...\")\n  await sem.wait()\n  console.log(\"Semaphore is green. Continuing task...\")\n}\n\nsem.red()\ntask()\nsetTimeout(() =\u003e {\n  sem.green()\n}, 5000)\n```\n\n\nSee [the API documentation](https://dutu.github.io/semaphore/) for more details on how to use it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdutu%2Fsemaphore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdutu%2Fsemaphore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdutu%2Fsemaphore/lists"}