# @devhobby/tab-sync

> Tab synchronizer is a library that allow you tu communicate between multiple tabs

Latest version **1.1.2** (published 2024-10-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @devhobby/tab-sync
pnpm add @devhobby/tab-sync
yarn add @devhobby/tab-sync
bun add @devhobby/tab-sync
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2024-10-21 |
| First published | 2019-04-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Pasquale De Lucia \| Francesco Bruno |
| Maintainers | varpdev, frabru |
| Keywords | tab, synchronize, tab synchronize, synchronizer, tab synchronizer |

## Links

- npm: https://www.npmjs.com/package/@devhobby/tab-sync
- Repository: https://github.com/VarPDev/tab-sync
- Homepage: https://github.com/VarPDev/tab-sync#readme
- Issues: https://github.com/VarPDev/tab-sync/issues
- npm.io page: https://npm.io/package/@devhobby/tab-sync

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^22.7.7

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2024-10-21
- 1.1.1 — 2024-10-21
- 1.1.0 — 2024-10-21
- 1.0.10 — 2019-04-04
- 1.0.9 — 2019-04-01
- 1.0.8 — 2019-04-01
- 1.0.7 — 2019-04-01
- 1.0.5 — 2019-04-01
- 1.0.4 — 2019-04-01
- 1.0.3 — 2019-04-01
- 1.0.2 — 2019-04-01

## README

# tab-sync

Tab synchronizer is a library that allow you tu communicate between multiple tabs

## compatibility

IE 9, Google Chrome, Mozilla Firefox, Safari, Opera and the most updated browser

## install

    npm i @devhobby/tab-sync --save

## usage

first tab

    import {TabSync} from '@devhobby/tab-sync'
    const tabEmitter = TabSync()

    setTimeout(() => {
    	tabEmitter.sync('myEvent', { params: {<any>}, applyOriginEmitter: boolean })
    }, 5000)

    tabEmitter.on('myEvent', (data) => {
    	console.log(data.params)
    })


second tab

    import {TabSync} from '@devhobby/tab-sync'
    const tabEmitter = TabSync()
    
    tabEmitter.on('hello', function (data) {
    	console.log(data.params)
    })
    
Note : tabEmitter.Sync() accept two parameters . The first param is the eventName to identify the event that will be emitted. The second param is a Object that contains two properties:

 1. params => arbitrary data that you would emit at all listeners

 1. applyOriginEmitter => this is a boolean that allow to emit also at emitterTab. default value is false.

---
_Source: https://npm.io/package/@devhobby/tab-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
