{"id":16847556,"url":"https://github.com/fabiosantoscode/limit-fn-parallelism","last_synced_at":"2025-10-04T04:47:04.569Z","repository":{"id":146300834,"uuid":"466771351","full_name":"fabiosantoscode/limit-fn-parallelism","owner":"fabiosantoscode","description":"Limits how much concurrency a function can have","archived":false,"fork":false,"pushed_at":"2022-03-06T15:08:11.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T07:17:25.274Z","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/fabiosantoscode.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":"2022-03-06T15:06:55.000Z","updated_at":"2022-03-06T15:07:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e84c2ed-7b1f-4a0a-a074-ffc42dd8aa26","html_url":"https://github.com/fabiosantoscode/limit-fn-parallelism","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabiosantoscode/limit-fn-parallelism","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Flimit-fn-parallelism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Flimit-fn-parallelism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Flimit-fn-parallelism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Flimit-fn-parallelism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiosantoscode","download_url":"https://codeload.github.com/fabiosantoscode/limit-fn-parallelism/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Flimit-fn-parallelism/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278266900,"owners_count":25958733,"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-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-10-13T13:08:20.131Z","updated_at":"2025-10-04T04:47:04.548Z","avatar_url":"https://github.com/fabiosantoscode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# limit-fn-parallelism\n\nMakes your function only be called with a maximum concurrency `limit`. Further calls are enqueued to be returned later.\n\n## Synopsis\n\n```js\nconst limitFnParallelism = require('limit-fn-parallelism')\nconst limitedFn = limitFn(async function expensiveFn(arg1, arg2) {\n    // do something expensive asynchronously...\n}, 2)\n\nconst results = await Promise.all([\n    limitedFn(1, 2), // Starts right away\n    limitedFn(3, 4), // Starts right away\n    limitedFn(5, 6)  // Only starts when one of the others finish\n])\n```\n\n## const limited = limitFnParallelism(asyncFn, [limit = 1])\n\nReturns a limited version of the input function.\n\n## limited.concurrentCalls\n\nThe number of executions going on at this moment in time.\n\n## await limited.allFinished()\n\nWaits for all calls to have returned (or thrown) limited.concurrentCalls will be zero.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Flimit-fn-parallelism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiosantoscode%2Flimit-fn-parallelism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Flimit-fn-parallelism/lists"}