{"id":22744242,"url":"https://github.com/rametta/limitor","last_synced_at":"2025-03-30T04:43:40.375Z","repository":{"id":57290213,"uuid":"151075049","full_name":"rametta/limitor","owner":"rametta","description":"⏱ A Future based rate limiter utility","archived":false,"fork":false,"pushed_at":"2018-10-01T14:39:26.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T23:53:01.481Z","etag":null,"topics":["fluture","future","rate-limiter","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rametta.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":"2018-10-01T11:05:13.000Z","updated_at":"2020-04-28T13:14:25.000Z","dependencies_parsed_at":"2022-08-25T05:20:48.793Z","dependency_job_id":null,"html_url":"https://github.com/rametta/limitor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rametta%2Flimitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rametta%2Flimitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rametta%2Flimitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rametta%2Flimitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rametta","download_url":"https://codeload.github.com/rametta/limitor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277351,"owners_count":20751548,"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":["fluture","future","rate-limiter","utility"],"created_at":"2024-12-11T01:41:18.282Z","updated_at":"2025-03-30T04:43:40.358Z","avatar_url":"https://github.com/rametta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/limitor.svg)](http://npm.im/limitor)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/rametta/limitor/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# ⏱ Limitor\n\nA [Future](https://github.com/fluture-js/Fluture) based rate limiter utility.\n\nUse in combination with `parallel` to ensure rate limits are not exceeded.\n\n## Install\n\n`yarn add limitor`\n\n## Usage\n\n```js\nimport limitor from 'limitor'\nimport { of, parallel } from 'fluture'\n\n/**\n * This example demonstrates how to group an array\n * of futures and ensure only the limit is executed\n * every second.\n * \n * Below, the first 2 futures will resolve instantly\n * and 1 second later the next 2 will resolve.\n */\n\nconst futures = [of(1), of(1), of(2), of(2)]\nconst limit = 2 // max 2 per second\n\nconst limited = limitor (futures) (limit)\n\nparallel(Infinity, limited).fork(console.error, console.log)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frametta%2Flimitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frametta%2Flimitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frametta%2Flimitor/lists"}