{"id":22412605,"url":"https://github.com/loaderb0t/data-mirror","last_synced_at":"2026-03-05T21:32:13.410Z","repository":{"id":264400624,"uuid":"893216007","full_name":"LoaderB0T/data-mirror","owner":"LoaderB0T","description":"Sync data across *any* boundaries","archived":false,"fork":false,"pushed_at":"2026-01-26T09:33:35.000Z","size":238,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-26T23:53:39.765Z","etag":null,"topics":[],"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/LoaderB0T.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-23T20:49:23.000Z","updated_at":"2026-01-26T09:32:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"96881db0-4e0c-4517-b300-ec2e4772c968","html_url":"https://github.com/LoaderB0T/data-mirror","commit_stats":null,"previous_names":["loaderb0t/data-mirror"],"tags_count":0,"template":false,"template_full_name":"LoaderB0T/typescript-starter","purl":"pkg:github/LoaderB0T/data-mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoaderB0T%2Fdata-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoaderB0T%2Fdata-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoaderB0T%2Fdata-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoaderB0T%2Fdata-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoaderB0T","download_url":"https://codeload.github.com/LoaderB0T/data-mirror/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoaderB0T%2Fdata-mirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30150425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T21:15:50.531Z","status":"ssl_error","status_checked_at":"2026-03-05T21:15:11.173Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-12-05T14:09:42.062Z","updated_at":"2026-03-05T21:32:13.388Z","avatar_url":"https://github.com/LoaderB0T.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/data-mirror?color=%2300d26a\u0026style=for-the-badge)](https://www.npmjs.com/package/data-mirror)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/LoaderB0T/data-mirror/build.yml?branch=main\u0026style=for-the-badge)](https://github.com/LoaderB0T/data-mirror/actions/workflows/build.yml)\n[![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/LoaderB0T_data-mirror?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge)](https://sonarcloud.io/summary/new_code?id=LoaderB0T_data-mirror)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/data-mirror?color=%23FF006F\u0026label=Bundle%20Size\u0026style=for-the-badge)](https://bundlephobia.com/package/data-mirror)\n\n# data-mirror\n\nSync data across **any\\*** boundaries.\n\n\u003cspan style=\"font-size: 8px\"\u003e\\* = Browser tabs, windows, contexts, out of the box. Extensible for everything else!\u003c/span\u003e\n\n## Motivation 💥\n\n**data-mirror** is a tool to synchronize data. It is extensible and can be used in various scenarios. Out of the box, it provides ways to synchronize within one window or across multiple tabs or windows (browser contexts).\n\n## Features 🔥\n\n✅ Synchronize data\n\n✅ Framework agnostic\n\n✅ Hashing for data comparison\n\n✅ Synchronize with callbacks\n\n✅ Synchronize within one window\n\n✅ Sync across multiple tabs or windows (browser contexts)\n\n✅ Extensible for custom synchronization scenarios\n\n## Built With 🔧\n\n- [TypeScript](https://www.typescriptlang.org/)\n\n## Installation 📦\n\n```console\npnpm i data-mirror\n// or\nyarn add data-mirror\n// or\nnpm i data-mirror\n```\n\n## Usage Example 🚀\n\n```typescript\nimport { DataMirror } from 'data-mirror';\n\nconst sync = new DataMirror('my-sync', a =\u003e a);\nsync.listenForChanges(value =\u003e {\n  console.log('new value:', value);\n});\nsync.update('test value');\n```\n\n### With strategies\n\n```typescript\nimport { DataMirror, DataMirrorWindowStrategy, DataMirrorBroadcastStrategy } from 'data-mirror';\n\nconst sync = new DataMirror('my-sync', a =\u003e a).withStrategy(\n  new DataMirrorWindowStrategy(),\n  new DataMirrorBroadcastStrategy()\n);\n```\n\n### Implement a custom strategy\n\n```typescript\nimport { DataMirrorStrategy, Payload } from 'data-mirror';\n\nexport class DataMirrorBroadcastStrategy\u003cT\u003e extends DataMirrorStrategy\u003cT\u003e {\n\n  public init() {\n    // Initialize the strategy\n  }\n\n  public onUpdate(payload: Payload\u003cT\u003e) {\n    // Handle the update to inform the remote instances about the change\n  }\n}\n\n```\n\n## Contributing 🧑🏻‍💻\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License 🔑\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n## Contact 📧\n\nJanik Schumacher - [@LoaderB0T](https://twitter.com/LoaderB0T) - [linkedin](https://www.linkedin.com/in/janikschumacher/)\n\nProject Link: [https://github.com/LoaderB0T/data-mirror](https://github.com/LoaderB0T/data-mirror)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floaderb0t%2Fdata-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floaderb0t%2Fdata-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floaderb0t%2Fdata-mirror/lists"}