{"id":15890073,"url":"https://github.com/nampdn/elex","last_synced_at":"2025-07-02T02:03:28.012Z","repository":{"id":34061330,"uuid":"161729814","full_name":"nampdn/elex","owner":"nampdn","description":"Perform election speed check on list of gateways to find the fastest url","archived":false,"fork":false,"pushed_at":"2025-06-18T22:37:10.000Z","size":1650,"stargazers_count":1,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T23:28:08.793Z","etag":null,"topics":["browser","gateway","http","ipfs","javascript","node","react-native","speedtest","typescript"],"latest_commit_sha":null,"homepage":"","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/nampdn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-12-14T04:04:09.000Z","updated_at":"2024-10-08T04:45:59.000Z","dependencies_parsed_at":"2023-02-18T21:00:48.939Z","dependency_job_id":"fcbe4832-bdce-4897-977b-9a5bc9aebbc7","html_url":"https://github.com/nampdn/elex","commit_stats":{"total_commits":638,"total_committers":4,"mean_commits":159.5,"dds":"0.35423197492163006","last_synced_commit":"944bc5fa4e1a026dcc3adef7f3ab550739933130"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nampdn/elex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nampdn%2Felex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nampdn%2Felex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nampdn%2Felex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nampdn%2Felex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nampdn","download_url":"https://codeload.github.com/nampdn/elex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nampdn%2Felex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260653790,"owners_count":23042642,"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":["browser","gateway","http","ipfs","javascript","node","react-native","speedtest","typescript"],"created_at":"2024-10-06T07:03:06.762Z","updated_at":"2025-07-02T02:03:27.989Z","avatar_url":"https://github.com/nampdn.png","language":"TypeScript","readme":"# elex \nPerform election speed check on list of gateways to find the fastest url\n\n[![npm version](https://badge.fury.io/js/elex.svg)](https://badge.fury.io/js/elex) [![Build Status](https://travis-ci.com/nampdn/elex.svg?branch=master)](https://travis-ci.com/nampdn/elex)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fnampdn%2Felex.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fnampdn%2Felex?ref=badge_shield)\n## Installation\n\n```bash\nyarn add elex\n```\n\n## Usage\n\n### Elect some (some most fastest):\n\n```javascript\nimport {electSome} from 'elex'\n\n(async () =\u003e {\n  const urlsToCheck = ['https://google.com', 'https://bing.com', 'https://vgm.tv', 'https://not-found-404.com']\n  const someFastUrls = await electSome(urlsToCheck, {count: 2, retries: 1}); // ['http://google.com', 'https://vgm.tv']\n})()\n```\n\n### Elect any (the fastest one):\n\n```javascript\nimport {electAny} from 'elex'\n\n(async () =\u003e {\n  const urlsToCheck = ['https://google.com', 'https://bing.com', 'https://vgm.tv', 'https://not-found-404.com']\n  const mostFastUrls = await electAny(urlsToCheck, {prefer: 'https://vgm.tv', retries: 1}); // 'https://vgm.tv'\n})()\n```\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fnampdn%2Felex.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fnampdn%2Felex?ref=badge_large)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnampdn%2Felex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnampdn%2Felex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnampdn%2Felex/lists"}