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

@ravti/analytics

Package Overview
Dependencies
Maintainers
3
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ravti/analytics - npm Package Compare versions

Comparing version 21.5.2-rc4b0 to 21.5.2-rc4b1

38

lib/analytics.js
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -326,6 +328,22 @@

metadata = _ref4.metadata;
console.debug("LogRocket noop: track called", {
key: key,
metadata: metadata
});
try {
var eventString = JSON.stringify({
key: key,
metadata: metadata
}, null, 2);
LogRocket.track(eventString);
} catch (err) {
// Let the console know but swallow the error so that we don't halt
// execution b/c we couldn't represent the payload as a JSON string
//
// https://docs.logrocket.com/reference#track
console.warn("Error while trying to track the event \"".concat(key, "\" to LogRocket"), err);
if (typeof key === "string" || key instanceof String) {
LogRocket.track(key);
} else {
console.debug("Could not track event to LogRocket with type ".concat(_typeof(key)));
}
}
}

@@ -345,2 +363,14 @@ }]);

_createClass(RavtiAnalytics, null, [{
key: "reduxMiddlware",
value: function reduxMiddlware() {
// If we ever need to add more middlewares for analytical purposes we can
// do this here... this at least sets the stage for us to have this
// consolidated in one place... also, in the future, we could consider
// using some of the sanitation features in the LogRocket middleware
// stuff...
//
// https://docs.logrocket.com/reference#redux-logging
return LogRocket.reduxMiddleware();
}
}, {
key: "start",

@@ -347,0 +377,0 @@ value: function start(user, userType) {

2

package.json
{
"name": "@ravti/analytics",
"version": "21.5.2-rc4b0",
"version": "21.5.2-rc4b1",
"description": "Ravti analytics",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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