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

@devboldly/react-use-google-analytics-embed-api

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devboldly/react-use-google-analytics-embed-api - npm Package Compare versions

Comparing version 0.0.38 to 0.0.39

11

dist/hooks/useAnalyticsApi.js

@@ -44,9 +44,14 @@ "use strict";

React.useEffect(function () {
var aborted = false;
var authorizedListener = function (isAuthorized) {
setAuthorized(isAuthorized);
if (!aborted) {
setAuthorized(isAuthorized);
}
};
exports.apiStateEmitter.on('authorized', authorizedListener);
var readyListener = function () {
setGapi(exports.apiSingleton.gapi);
setHookReady(true);
if (!aborted) {
setGapi(exports.apiSingleton.gapi);
setHookReady(true);
}
};

@@ -53,0 +58,0 @@ exports.apiStateEmitter.on('ready', readyListener);

@@ -27,6 +27,10 @@ "use strict";

React.useEffect(function () {
var randNum = Math.random();
var aborted = false;
var randNum = Math.random() * 1000000;
var authorizedListener = function (isAuthorized) {
console.log('Calling setAuthorized', randNum);
setAuthorized(isAuthorized);
console.log('Calling setAuthorized', randNum, 'aborted?', aborted);
if (!aborted) {
setAuthorized(isAuthorized);
}
console.log('Stats from', randNum, ' - Called for:', useAnalyticsApi_1.apiStateEmitter.listenerCount, 'listeners.');
};

@@ -33,0 +37,0 @@ useAnalyticsApi_1.apiStateEmitter.on('authorized', authorizedListener);

{
"name": "@devboldly/react-use-google-analytics-embed-api",
"version": "0.0.38",
"version": "0.0.39",
"author": "Dev Boldly <devboldly@gmail.com>",

@@ -33,5 +33,3 @@ "description": "React hook for loading the Google Analytics Embed API.",

"keywords": [],
"dependencies": {
"@devboldly/react-use-window-global": "0.0.9"
},
"dependencies": {},
"peerDependencies": {

@@ -38,0 +36,0 @@ "react": "^16.13.0",

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