New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-cross-client-router

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cross-client-router - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

8

dist/index.es.js

@@ -29,4 +29,10 @@ import React, { Component } from 'react';

/**
* if we are on react-native, there is no window.addEventListener
* @link https://github.com/pubkey/unload/issues/6
*/
if (typeof window.addEventListener !== 'function') return;
/**
* for normal browser-windows, we use the beforeunload-event
*/
window.addEventListener('beforeunload', function () {

@@ -104,3 +110,3 @@ fn();

startListening();
if (typeof fn !== 'function') throw new Error('The "listener" argument must be of type Function. Received type ' + typeof fn);
if (typeof fn !== 'function') throw new Error('Listener is no function');
LISTENERS.add(fn);

@@ -107,0 +113,0 @@ var addReturn = {

@@ -36,4 +36,10 @@ 'use strict';

/**
* if we are on react-native, there is no window.addEventListener
* @link https://github.com/pubkey/unload/issues/6
*/
if (typeof window.addEventListener !== 'function') return;
/**
* for normal browser-windows, we use the beforeunload-event
*/
window.addEventListener('beforeunload', function () {

@@ -111,3 +117,3 @@ fn();

startListening();
if (typeof fn !== 'function') throw new Error('The "listener" argument must be of type Function. Received type ' + typeof fn);
if (typeof fn !== 'function') throw new Error('Listener is no function');
LISTENERS.add(fn);

@@ -114,0 +120,0 @@ var addReturn = {

2

package.json
{
"name": "react-cross-client-router",
"version": "1.0.5",
"version": "1.0.6",
"description": "A tool to control React apps spanning multiple tabs, windows or devices",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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