Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

use-broadcast-ts

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-broadcast-ts - npm Package Compare versions

Comparing version 1.4.5 to 1.5.0

2

dist/index.js

@@ -334,2 +334,3 @@ 'use strict';

tabs.splice(0, tabs.length, ...e.data.tabs);
options == null ? void 0 : options.onBecomeMain == null ? void 0 : options.onBecomeMain();
}

@@ -355,2 +356,3 @@ }

isSynced = true;
options == null ? void 0 : options.onBecomeMain == null ? void 0 : options.onBecomeMain();
}

@@ -357,0 +359,0 @@ }, (_options$mainTimeout = options == null ? void 0 : options.mainTimeout) != null ? _options$mainTimeout : 100);

@@ -19,2 +19,6 @@ import { StateCreator, StoreMutatorIdentifier } from 'zustand';

unsync?: boolean;
/**
* Callback when this tab / window becomes the main tab / window
*/
onBecomeMain?: () => void;
};

@@ -21,0 +25,0 @@ /**

2

package.json
{
"name": "use-broadcast-ts",
"version": "1.4.5",
"version": "1.5.0",
"description": "Use the Broadcast Channel API in React easily with hooks or Zustand, and Typescript!",

@@ -5,0 +5,0 @@ "type": "module",

@@ -159,2 +159,8 @@ # use-broadcast-ts

##### options.onBecomeMain
Type: `() => void`
A callback that will be called when the tab becomes the main tab.
### useBroadcast (hooks)

@@ -161,0 +167,0 @@

@@ -22,2 +22,7 @@ import { StateCreator, StoreMutatorIdentifier } from 'zustand';

unsync?: boolean;
/**
* Callback when this tab / window becomes the main tab / window
*/
onBecomeMain?: () => void;
};

@@ -244,2 +249,4 @@

tabs.splice(0, tabs.length, ...e.data.tabs);
options?.onBecomeMain?.();
}

@@ -262,2 +269,4 @@ }

isSynced = true;
options?.onBecomeMain?.();
}

@@ -264,0 +273,0 @@ }, options?.mainTimeout ?? 100);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc