{"id":19670402,"url":"https://github.com/mat-sz/tabcast","last_synced_at":"2025-04-29T00:31:49.449Z","repository":{"id":65513819,"uuid":"288778798","full_name":"mat-sz/tabcast","owner":"mat-sz","description":"⚡️ TypeScript message passing (broadcasting) across multiple tabs of same origin.","archived":false,"fork":false,"pushed_at":"2022-02-18T17:12:56.000Z","size":83,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T18:43:14.816Z","etag":null,"topics":["browser","javascript-library","message-passing","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mat-sz.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":"2020-08-19T16:12:07.000Z","updated_at":"2022-09-07T07:46:10.000Z","dependencies_parsed_at":"2023-01-26T21:00:15.046Z","dependency_job_id":null,"html_url":"https://github.com/mat-sz/tabcast","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ftabcast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ftabcast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ftabcast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ftabcast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mat-sz","download_url":"https://codeload.github.com/mat-sz/tabcast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224142841,"owners_count":17262884,"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","javascript-library","message-passing","typescript-library"],"created_at":"2024-11-11T17:06:08.084Z","updated_at":"2024-11-11T17:06:08.685Z","avatar_url":"https://github.com/mat-sz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003etabcast\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nTypeScript message passing (broadcasting) across multiple tabs of same origin.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"workflow\" src=\"https://img.shields.io/github/workflow/status/mat-sz/tabcast/Node.js%20CI%20(yarn)\"\u003e\n\u003ca href=\"https://npmjs.com/package/tabcast\"\u003e\n\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/tabcast\"\u003e\n\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dw/tabcast\"\u003e\n\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/tabcast\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\nTabcast is available on [npm](https://www.npmjs.com/package/tabcast), you can install it with either npm or yarn:\n\n```sh\nnpm install tabcast\n# or:\nyarn install tabcast\n```\n\n## Example usage\n\n```ts\nimport Tabcast from 'tabcast';\n\nconst cast = new Tabcast(); // or new Tabcast('channel');\n\ncast.on('message', (message: any) =\u003e {\n  console.log(message);\n});\n\ncast.broadcast('Hello, world!');\n```\n\n## Events\n\n## message\n\nEmitted when a valid message is received.\n\nThe only argument contains an object of type T with a deserialized message.\n\n## API\n\n```\non(eventType: 'message', listener: (message: T) =\u003e void);\n\noff(eventType: 'message', listener: (message: T) =\u003e void);\n\nconstructor(private channel: string);\nbroadcast(message: T);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmat-sz%2Ftabcast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmat-sz%2Ftabcast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmat-sz%2Ftabcast/lists"}