{"id":15467973,"url":"https://github.com/rangermauve/hypercore-really-ready","last_synced_at":"2025-07-05T18:12:42.376Z","repository":{"id":143880758,"uuid":"249847345","full_name":"RangerMauve/hypercore-really-ready","owner":"RangerMauve","description":"Waits for a hypercore to be _really_ ready. That is, that it's synced with peers and is good to go","archived":false,"fork":false,"pushed_at":"2020-03-25T00:47:09.000Z","size":11,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T12:05:06.220Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RangerMauve.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":"2020-03-25T00:15:55.000Z","updated_at":"2022-12-28T19:43:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7c8724d-26a1-44d8-aef6-078c9011bc15","html_url":"https://github.com/RangerMauve/hypercore-really-ready","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"6782a6fdf88a8079f23f64a25e4d19c91e3fdc74"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RangerMauve%2Fhypercore-really-ready","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RangerMauve%2Fhypercore-really-ready/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RangerMauve%2Fhypercore-really-ready/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RangerMauve%2Fhypercore-really-ready/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RangerMauve","download_url":"https://codeload.github.com/RangerMauve/hypercore-really-ready/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931888,"owners_count":21827181,"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":"2024-10-02T01:34:54.138Z","updated_at":"2025-05-07T18:22:20.596Z","avatar_url":"https://github.com/RangerMauve.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hypercore-really-ready\nWaits for a hypercore to be _really_ ready. That is, that it's synced with peers and is good to go\n\nChecks for the following:\n\n- Waits for the `ready` event to make sure internal stuff is initialized\n- If the feed is writable, it's ready\n- If you have peers, make sure you know what the latest index they know if is\n- If you don't have peers, wait for them and update the index\n\nYou should probably wrap this with a timeout for any user-facing application since there's a chance a feed will never get peers.\n\n## Installing\n\n```\nnpm install --save hypercore-really-ready\n```\n\n## Example\n\n```javascript\nconst reallyReady = require('hypercore-really-ready')\n\n// The feed is initialized and has synced with peers\n// You might want to wrap this in a timeout\nawait reallyReady(feed)\n\n// If you have a hyperdrive, pass in its metadata feed\n// This will make sure you don't get empty or outdated readdir calls\nawait reallyReady(hyperdrive.metadata)\n\n// You can also use callbacks if that's more your thing\nreallyReady(feed, (err) =\u003e {\n\tif(err) console.error(err)\n\telse console.log('It's ready!')\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangermauve%2Fhypercore-really-ready","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frangermauve%2Fhypercore-really-ready","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangermauve%2Fhypercore-really-ready/lists"}