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

broadcast-channel

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broadcast-channel - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

dist/es/methods/native.js

@@ -44,4 +44,9 @@ var isNode = require('detect-node');

export function canBeUsed() {
if (isNode) return false;
/**
* in the electron-renderer, isNode will be true even if we are in browser-context
* so we also check if window is undefined
*/
if (isNode && typeof window === 'undefined') return false;
if (typeof BroadcastChannel === 'function') {

@@ -48,0 +53,0 @@ if (BroadcastChannel._pubkey) {

@@ -57,4 +57,9 @@ 'use strict';

function canBeUsed() {
if (isNode) return false;
/**
* in the electron-renderer, isNode will be true even if we are in browser-context
* so we also check if window is undefined
*/
if (isNode && typeof window === 'undefined') return false;
if (typeof BroadcastChannel === 'function') {

@@ -61,0 +66,0 @@ if (BroadcastChannel._pubkey) {

2

package.json
{
"name": "broadcast-channel",
"version": "2.0.0",
"version": "2.0.1",
"description": "A BroadcastChannel implementation that works with new browsers, older browsers and Node.js",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/pubkey/broadcast-channel#readme",

@@ -47,4 +47,9 @@ const isNode = require('detect-node');

export function canBeUsed() {
if (isNode) return false;
/**
* in the electron-renderer, isNode will be true even if we are in browser-context
* so we also check if window is undefined
*/
if (isNode && typeof window === 'undefined') return false;
if (typeof BroadcastChannel === 'function') {

@@ -51,0 +56,0 @@ if (BroadcastChannel._pubkey) {

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