{"id":18400238,"url":"https://github.com/mtripg6666tdr/async-lock","last_synced_at":"2026-05-05T22:43:32.626Z","repository":{"id":57679351,"uuid":"492182950","full_name":"mtripg6666tdr/async-lock","owner":"mtripg6666tdr","description":"Promise based simple mutex for JS: preventing from running same code block at the same time.","archived":false,"fork":false,"pushed_at":"2023-05-08T06:23:58.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T11:47:13.936Z","etag":null,"topics":["async","async-lock","browser","javascript","lock","mutex","nodejs","promise","promise-lock"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@mtripg6666tdr/async-lock","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/mtripg6666tdr.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":"2022-05-14T10:26:25.000Z","updated_at":"2023-06-03T08:15:17.000Z","dependencies_parsed_at":"2024-12-24T11:40:41.276Z","dependency_job_id":"4637ee55-346d-4451-a406-e5a3e8d08eca","html_url":"https://github.com/mtripg6666tdr/async-lock","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"ce3e28114c07f5c0af00e99a8230e4835128d60d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtripg6666tdr%2Fasync-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtripg6666tdr%2Fasync-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtripg6666tdr%2Fasync-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtripg6666tdr%2Fasync-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtripg6666tdr","download_url":"https://codeload.github.com/mtripg6666tdr/async-lock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248601509,"owners_count":21131609,"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":["async","async-lock","browser","javascript","lock","mutex","nodejs","promise","promise-lock"],"created_at":"2024-11-06T02:30:52.837Z","updated_at":"2026-05-05T22:43:32.587Z","avatar_url":"https://github.com/mtripg6666tdr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-lock\nPromise based simple mutex for JS: preventing from running same code block at the same time.  \n\n## API\n- LockObj (class)  \n  used to store mutex statuses.\n- lock (function)  \n  used to lock statement, just like C# `lock{}`.\n\n# Usage\n```js\nconst { lock, LockObj } = require(\"@mtripg6666tdr/async-lock\");\n\nconst locker = new LockObj();\nconst someFunction = async () =\u003e {\n  return await lock(locker, () =\u003e {\n    // do some stuff.\n  });\n};\n```\n\n## Example\nPlease see [test file](test/index.js).\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtripg6666tdr%2Fasync-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtripg6666tdr%2Fasync-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtripg6666tdr%2Fasync-lock/lists"}