{"id":24143284,"url":"https://github.com/little-core-labs/hypercore-replicate","last_synced_at":"2025-09-19T11:31:59.028Z","repository":{"id":57270163,"uuid":"185250183","full_name":"little-core-labs/hypercore-replicate","owner":"little-core-labs","description":"A simple function to replicate multiple hypercores.","archived":false,"fork":false,"pushed_at":"2019-11-01T18:26:01.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-05T04:06:47.661Z","etag":null,"topics":["hypercore","replicate","util"],"latest_commit_sha":null,"homepage":"","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/little-core-labs.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":"2019-05-06T18:28:10.000Z","updated_at":"2022-11-08T17:34:36.000Z","dependencies_parsed_at":"2022-08-25T02:51:35.982Z","dependency_job_id":null,"html_url":"https://github.com/little-core-labs/hypercore-replicate","commit_stats":null,"previous_names":["jwerle/hypercore-replicate"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhypercore-replicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhypercore-replicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhypercore-replicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhypercore-replicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/little-core-labs","download_url":"https://codeload.github.com/little-core-labs/hypercore-replicate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233566752,"owners_count":18695290,"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":["hypercore","replicate","util"],"created_at":"2025-01-12T05:14:55.260Z","updated_at":"2025-09-19T11:31:53.742Z","avatar_url":"https://github.com/little-core-labs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"hypercore-replicate\n===================\n\nA simple function to replicate multiple hypercores.\n\n## Installation\n\n```sh\n$ npm install hypercore-replicate\n```\n\n## Usage\n\n```js\nconst replicate = require('hypercore-replicate')\nreplicate(...hypercores, opts, callback)\n```\n\n## Example\n\n```js\nconst replicate = require('hypercore-replicate')\nconst hypercore = require('hypercore')\nconst ram = require('random-access-memory')\n\nconst feed = hypercore(ram)\nfeed.ready(() =\u003e {\n  const copy = hypercore(ram, feed.key)\n  const other = hypercore(ram, feed.key)\n  replicate(feed, copy, other.replicate(), { live: true })\n  feed.append('hello')\n  copy.update(() =\u003e copy.head(console.log)) // 'null \u003cBuffer 68 65 6c 6c 6f\u003e'\n  other.update(() =\u003e other.head(console.log)) // 'null \u003cBuffer 68 65 6c 6c 6f\u003e'\n})\n```\n\n## API\n\n### `stream = replicate(...hypercores, opts, onend)`\n\nReplicate a variable amount of hypercores that share the same key with each\nother where `opts` is passed to `hypercores[i].relicate(opts)` and\n`onend` is called when all the replication streams have ended.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-core-labs%2Fhypercore-replicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittle-core-labs%2Fhypercore-replicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-core-labs%2Fhypercore-replicate/lists"}