{"_id":"use-broadcast-channel","_rev":"10-1b28540933734f6479a72a6489875c03","name":"use-broadcast-channel","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"use-broadcast-channel","version":"0.1.0","keywords":["react","hook","use","broadcast","channel","share","browser","state"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.1.0","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"27c596ee29b867b2ec7fd872fddc9f041f78b855","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.1.0.tgz","fileCount":7,"integrity":"sha512-vVdAtllBp14p3gffxA3pMNxbwHcnNOIPaqLA9KoQGwq1p2Ay/rgySrgY8oVBDqZo6HB+akwi64XSBR0EizThRQ==","signatures":[{"sig":"MEQCIBQzHigdL5YkFscrW8DMdzzAO2nhxWodmbYF0PLro1CiAiB4qKTnKcJ0yLxU7O7pTEWpBqV4WWpHDCYHysW3QZ/pjQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11020},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"node":"./dist/index.cjs","import":"./dist/index.mjs","typing":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"efff2c45ea52a9d192ff4d3b3becd00f5ba5764b","scripts":{"test":"echo \"Error: no test specified\" && exit 0","build":"bash ./scripts/build.sh","start":"tsc --watch --noEmit --emitDeclarationOnly false","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"6.14.15","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"12.22.6","dependencies":{"@types/node":"12 || 14 || 16","@types/react":"^16.8 || 17","broadcastchannel-polyfill":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","esbuild":"^0.13.7","typescript":"^4.4.4","@types/node":"^16.11.0","@types/react":"^17.0.30"},"peerDependencies":{"react":"^16.8 || 17"},"optionalDependencies":{"@types/node":"12 || 14 || 16","@types/react":"^16.8 || 17","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.1.0_1634396285349_0.09072324302892598","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"use-broadcast-channel","version":"0.1.1","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.1.1","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"fc441d02541781581a797bdbe656cf7aa1999eb6","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.1.1.tgz","fileCount":7,"integrity":"sha512-RQ3eZvDbZIuAKlTjuk9mRMWuQNGBHtZA+IyKnYn/J0ifSZsqdxKeSd/uVhfDZQZwH3R5t7zNvcBNH+mxyPOqfQ==","signatures":[{"sig":"MEQCIHFGAxjjiSy5uVO7W9Yu9pGZ3ymFvIbberjzrlb2GW+6AiB66/GdnGxhKqow5eYS7aLrIDT6B7UlSnatAVcEikNldA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11181},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"node":"./dist/index.cjs","import":"./dist/index.mjs","typing":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"979d03ee3c3ac99289d8b769a51a71111570c27c","scripts":{"test":"echo \"Error: no test specified\" && exit 0","build":"bash ./scripts/build.sh","start":"tsc --watch --noEmit --emitDeclarationOnly false","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"6.14.15","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"12.22.6","_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","esbuild":"^0.13.7","typescript":"^4.4.4","@types/node":"^16.11.0","@types/react":"^17.0.30"},"peerDependencies":{"react":"^16.8 || 17","@types/node":"12 || 14 || 16","@types/react":"^16.8 || 17","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.1.1_1634396728370_0.744195976603909","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"use-broadcast-channel","version":"0.1.2","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.1.2","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"4e73bec9f13523d485a34a2bc49ee0944d6d338e","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.1.2.tgz","fileCount":8,"integrity":"sha512-4S5EiwsmoqJpfpXueUD84T05nFteiPTqKcp9ydOvv0hAHmo7fdesnIPVRuVFEZ0uEiduFPlvYdKfGVjMKtDe/Q==","signatures":[{"sig":"MEUCICTdDfsaYOC270reqMwu3Nef1cky3zf+bwnZy5gS3Ga7AiEAvgjokNrvMZs50tglcYQuUM2lbQO4NUTQNjamavNoksQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2/HtCRA9TVsSAnZWagAAytUP/RKGlZjKI4pRM7/Iu/KZ\ngVZdeBTnEv8jqSFgtZfH/tiOUvKcpnWRDNp2hJluTCQt1UTNGeuSdiWGYEJ/\nnSQcKNNgmP6pKx9pRsYYH9nUKRk4Fp5uBa6bag5LzYDiZ3wzvtnJJ8xzsmh+\nIohW7Ts5B1uO87hCnD0GEmQSx87kk8//xoK75tVp++djd+09QSZXWiOaUmaU\npH0VzH3nMXW/SsFUtl8uDA4V3CBrQXjsjY4RApC96UnYt8WCdp61IWMNUjAF\nR+UNL5vzLAsnZBGz6zbHWGpKqGntC639K46V5n41At06WT8G2c/QtTezPHGn\nw0gJHhP8zxUBOAwksHJ8vpqFGrI9Hk3QsuzFx0v7+o4M9p9FhjOT1Otdrcqa\ntEDP6qXbFzJ1UvPR8L9LfN35PgslPcBVNOtVn6VQoVdUav1FJDdfg5/GJM9g\nC5ib4R9TUcYd74rV3+qeMG9Rfn+S1xsLY3WXBf+5NpmDc4G/MOba6fFgd+rz\nrzpsHrFtIfh4Ro6BfexLTopjqlNiRlkx6YbKw8XOhpI092g1QqjqpF5xhiMn\nMEJseQAi0wh575D19SEFOBlmmnJf3A/pupFpasELIiWIvUfy5qGilV6CrL70\nv4UXxddWGOR1gqm6wG8f40jGU4fgW/SE3T3wewljCdzDjS7cPfzIPNLavY1f\nRMru\r\n=N+Uj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"node":"./dist/index.cjs","import":"./dist/index.mjs","typing":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e2d708e3ebbf7932bba74122693c57ad77209cbe","scripts":{"test":"jest","build":"bash ./scripts/build.sh","start":"tsc --watch --noEmit --emitDeclarationOnly false","prebuild":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"6.14.15","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"12.22.6","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.5","react":"^17.0.2","esbuild":"^0.13.7","jest-dom":"^4.0.0","react-dom":"^17.0.0","typescript":"^4.4.4","@types/jest":"^27.0.2","@types/node":"^16.11.0","@types/react":"^17.0.30","@babel/preset-env":"^7.15.8","@babel/preset-typescript":"^7.15.0","@testing-library/react-hooks":"^7.0.2"},"peerDependencies":{"react":"^16.8 || 17","@types/node":"12 || 14 || 16","@types/react":"^16.8 || 17","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.1.2_1634399405098_0.6511053708193857","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"use-broadcast-channel","version":"0.1.3","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.1.3","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"36332c464a7ee1dfbd5be4af63539b51f8b6a7f0","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.1.3.tgz","fileCount":7,"integrity":"sha512-DPUk550bylxdabi6zZrdMP14OBd8cLqMqf/nwxd+6Ej7ydAVzk8DxW6z5uy4SgaTGFUfySNANBon48nvYcrdPw==","signatures":[{"sig":"MEYCIQDkhU7LZV2KlD1xEgK2A2pcy//K8u3fat4Xos8mBF/Q2QIhAMBU9nVslRs+3o3OarTLQNxJ9Nefv/Xd5J/63ibBGZkP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11409},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"node":"./dist/index.cjs","types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"8e01c3cc1eed5eeef852ca4ad5eefd8e654ef52d","scripts":{"build":"bash ./scripts/build.sh","start":"tsc --watch --noEmit --emitDeclarationOnly false","prebuild":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"10.2.4","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","esbuild":"^0.19.0","react-dom":"^18.2.0","typescript":"^5.1.6","@types/jest":"^29.5.3","@types/node":"^20.4.8","@types/react":"^18.2.19"},"peerDependencies":{"react":"^16.8 || 17 || 18","@types/node":"16 || 18 || 20","@types/react":"^16.8 || 17 || 18","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.1.3_1710100458383_0.1697097862685959","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"use-broadcast-channel","version":"0.2.2","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.2.2","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"7f0794b40c3d00575426432d225b39c337c9f367","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.2.2.tgz","fileCount":7,"integrity":"sha512-EDjk67MHwBfS2yhoqBoImaIX9qZVilvPeNu2qOJFZOCvXW6tkWoH4R+k0bl3ctJFHi5zai5vo8aABDmIDJS2yA==","signatures":[{"sig":"MEUCIERa9EeDXtHk6qsXR9XKCSmbjfd3wRdFphLKWS0uf2qBAiEApp9bvxdRTdMrU0HUnGZc+J8tdyC6+R2g36MZ316M6m4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20422},"main":"./cjs/index.js","type":"module","types":"./esm/index.d.ts","module":"./esm/index.js","exports":{".":{"types":"./esm/index.d.ts","default":"./esm/index.js","require":"./cjs/index.js"},"./package.json":"./package.json"},"gitHead":"61d223596040fe7d7ec6f47881ae9094c927fcc9","scripts":{"build":"rm -rf dist & true; yarn build:cjs & yarn build:esm","start":"tsc --watch --noEmit --emitDeclarationOnly false","build:cjs":"rm -rf cjs; tsc -p tsconfig.cjs.json","build:esm":"rm -rf esm; tsc -p tsconfig.esm.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"10.2.4","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.1.6","@types/jest":"^29.5.3","@types/node":"^20.4.8","@types/react":"^18.2.19"},"peerDependencies":{"react":"^16.8 || 17 || 18 || >19","@types/node":">16","@types/react":">17","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.2.2_1717938588045_0.6261344137124987","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"use-broadcast-channel","version":"0.3.0","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.3.0","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"0bad22126cb78f11f1b722d0c70db4953b7318a6","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.3.0.tgz","fileCount":10,"integrity":"sha512-SBVwAqa3X748HBNGSCGo8PAUyK1uDdgm/UfNZO8PUHeXgVudX1Mw+uldDGINwTytwuKMjjQtlVX1HvleRpDu2Q==","signatures":[{"sig":"MEQCIFFuiwqkIyKUoO9qx2TIoRcCemoaVA6AQMgdNljJYSxDAiBlQnx2hufgv8yCAaa77P+nhxMT9ApPrmxr9lT9TQiCFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27942},"main":"./cjs/index.js","type":"module","types":"./esm/index.d.ts","module":"./esm/index.js","exports":{".":{"types":"./esm/index.d.ts","default":"./esm/index.js","require":"./cjs/index.js"},"./package.json":"./package.json"},"gitHead":"e17bd5d5ded04e8d8de552c657f72e344a58e0e7","scripts":{"build":"rm -rf dist & true; yarn build:cjs & yarn build:esm","start":"tsc --watch --noEmit --emitDeclarationOnly false","build:cjs":"rm -rf cjs; tsc -p tsconfig.cjs.json","build:esm":"rm -rf esm; tsc -p tsconfig.esm.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"10.2.4","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.2.13","react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.1.6","@types/jest":"^29.5.3","@types/node":"^20.4.8","@types/react":"^18.2.19","@vitejs/plugin-react":"^4.3.0"},"peerDependencies":{"react":"^16.8 || 17 || 18 || >19","@types/node":">16","@types/react":">17","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.3.0_1717940521256_0.21155966742811705","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"use-broadcast-channel","version":"0.3.1","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","_id":"use-broadcast-channel@0.3.1","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"dist":{"shasum":"6f9a6b3d74115faea449e4d37ddf370f6fd38df4","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.3.1.tgz","fileCount":10,"integrity":"sha512-QrPCc37NkrUdpZFKq4aJqUbwm+38LgTadjYRREXMs/vYr7uQktchXurrJWEwmx8awAIgKbDnPN4gkrr6a07KRA==","signatures":[{"sig":"MEUCIQCxMJcM8fcLyF5DdqYDAtI4CZwoLxt/7IkIJtYm4TQ6EwIgAho8B8KpSpbMFHKl/dYstiZvS5HQH9uRLT8VIt+9Vqo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27943},"main":"./cjs/index.js","type":"module","types":"./esm/index.d.ts","module":"./esm/index.js","exports":{".":{"types":"./esm/index.d.ts","default":"./esm/index.js","require":"./cjs/index.js"},"./package.json":"./package.json"},"gitHead":"89666bed60cc3661b69404b9cf0246531074498e","scripts":{"build":"rm -rf dist & true; yarn build:cjs & yarn build:esm","start":"tsc --watch --noEmit --emitDeclarationOnly false","build:cjs":"rm -rf cjs; tsc -p tsconfig.cjs.json","build:esm":"rm -rf esm; tsc -p tsconfig.esm.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git","type":"git"},"_npmVersion":"10.9.2","description":"React hooks for accessing web broadcast channel.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.2.13","react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.1.6","@types/jest":"^29.5.3","@types/node":"^20.4.8","@types/react":"^18.2.19","@vitejs/plugin-react":"^4.3.0"},"peerDependencies":{"react":"^16.8 || 17 || 18 || >=19","@types/node":">16","@types/react":">17","broadcastchannel-polyfill":"^1.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/use-broadcast-channel_0.3.1_1744108104201_0.2621482643639632","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"use-broadcast-channel","version":"0.4.0","description":"React hooks for accessing web broadcast channel.","type":"module","main":"./cjs/index.js","module":"./esm/index.js","types":"./esm/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./esm/index.d.ts","require":"./cjs/index.js","default":"./esm/index.js"}},"scripts":{"build":"rm -rf dist & true; yarn build:cjs & yarn build:esm","build:cjs":"rm -rf cjs; tsc -p tsconfig.cjs.json","build:esm":"rm -rf esm; tsc -p tsconfig.esm.json","start":"tsc --watch --noEmit --emitDeclarationOnly false","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git"},"keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"author":"","license":"MIT","bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","devDependencies":{"@types/jest":"^29.5.3","@types/node":"^20.4.8","@types/react":"^18.2.19","@vitejs/plugin-react":"^4.3.0","react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.1.6","vite":"^5.2.13"},"peerDependencies":{"@types/node":">16","@types/react":">17","broadcastchannel-polyfill":"^1.0.0","react":"^16.8 || 17 || 18 || >=19"},"peerDependenciesMeta":{"@types/node":{"optional":true},"@types/react":{"optional":true},"broadcastchannel-polyfill":{"optional":true},"react":{"optional":false}},"_id":"use-broadcast-channel@0.4.0","gitHead":"d6a7764ee5fa31ed5be679c58c143b414f9c202f","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ES++qzv2piltplAEx8h7duUNIvzS7VrcWgUsL/BkiAWgdjdjVXvFTh/4L0zmVGp5FNEBZkvDBBAQ+KQVrH2A0g==","shasum":"61e8f6fe5da042759e2f6afe114961c7f23c8bbd","tarball":"https://registry.npmjs.org/use-broadcast-channel/-/use-broadcast-channel-0.4.0.tgz","fileCount":10,"unpackedSize":27884,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDQsbGlYBb7LFA8W9ga6scsnsPjkNrUj7F6rDIcNORR1AiEAzfTgv9gfbFi7DEU+CoE9gV9707C/BX1UT0LOEBU0FRs="}]},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"directories":{},"maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-broadcast-channel_0.4.0_1762375759827_0.5329118576241845"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-16T14:58:05.349Z","modified":"2025-11-05T20:49:20.209Z","0.1.0":"2021-10-16T14:58:05.520Z","0.1.1":"2021-10-16T15:05:28.496Z","0.1.2":"2021-10-16T15:50:05.276Z","0.1.3":"2024-03-10T19:54:18.570Z","0.2.2":"2024-06-09T13:09:48.237Z","0.3.0":"2024-06-09T13:42:01.468Z","0.3.1":"2025-04-08T10:28:24.371Z","0.4.0":"2025-11-05T20:49:20.021Z"},"bugs":{"url":"https://github.com/GuptaSiddhant/react-broadcast-channel/issues"},"license":"MIT","homepage":"https://github.com/GuptaSiddhant/react-broadcast-channel#readme","keywords":["react","hook","hooks","use","broadcast","channel","share","browser","state","tabs"],"repository":{"type":"git","url":"git+https://github.com/GuptaSiddhant/react-broadcast-channel.git"},"description":"React hooks for accessing web broadcast channel.","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"readme":"# use-broadcast-channel (React-hooks)\n\n> The **Broadcast Channel API** allows basic communication between browsing contexts (that is, windows, tabs, frames, or iframes) and workers on the same origin. _-[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API)_\n\nThis package provides a thin wrapper around the browser's native Broadcast Channel API in the form of a React hook function. The hook(s) can be used in any React component or custom hook to harness the functionality of Broadcast Channel API.\n\n_To use the hooks in browsers that do not support Broadcast Channel API, install and import [broadcastchannel-polyfill](https://www.npmjs.com/package/broadcastchannel-polyfill)._\n\n> For typescript users: The default data-type for all messages are set to `string` but can be easily overridden by explicitly passing type parameter to the hook(s). Example for numeric data: `useBroadcastChannel<number>(\"count\", (e) => console.log(e.data));`\n\n## Setup\n\nPackage available at [NPM](https://www.npmjs.com/package/use-broadcast-channel).\n\n- NPM\n\n  ```shell\n  npm install use-broadcast-channel\n  ```\n\n- Yarn\n\n  ```shell\n  yarn add use-broadcast-channel\n  ```\n\n## API\n\nThe package exports multiple hooks for different use-cases.\n\n### `useBroadcastChannel` hook\n\nReact hook to create and manage a Broadcast Channel across multiple browser windows/tabs/frames.\nThis is base hook exported by the package as all other exported hooks depends on it.\n\n#### - Read-only\n\nOnly subscribe for events broadcasted on a particular channel.\n\n```tsx\nimport { useBroadcastChannel } from \"use-broadcast-channel\";\n\nfunction App() {\n  useBroadcastChannel(\"userId\", (e) => alert(e.data));\n  return null;\n}\n```\n\n#### - Write-only\n\nOnly broadcast (post) event on a particular channel.\n\n```tsx\nimport { useBroadcastChannel } from \"use-broadcast-channel\";\n\nfunction App() {\n  const postUserId = useBroadcastChannel(\"userId\");\n  return <button onClick={() => postUserId(\"ABC123\")}>Post UserId</button>;\n}\n```\n\n#### - Read and Write\n\nBoth broadcast (post) event and subscribe for events broadcasted on a particular channel.\n\n```tsx\nimport { useBroadcastChannel } from \"use-broadcast-channel\";\n\nfunction App() {\n  const postUserId = useBroadcastChannel(\"userId\", (e) => alert(e.data));\n  return <button onClick={() => postUserId(\"ABC123\")}>Send UserId</button>;\n}\n```\n\n### `useBroadcastState` hook\n\nReact hook to manage state across browser windows/tabs/frames. It has a similar signature as `React.useState`. It used `useBroadcastChannel` under the hood.\n\n```tsx\nimport { useBroadcastState } from \"use-broadcast-channel\";\n\nfunction App() {\n  const [count, setCount] = useBroadcastState(\"count\", 0);\n  return (\n    <div>\n      <button onClick={() => setCount((prev) => prev - 1)}>Decrement</button>\n      <span>{count}</span>\n      <button onClick={() => setCount((prev) => prev + 1)}>Increment</button>\n    </div>\n  );\n}\n```\n","readmeFilename":"README.md"}