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

backtrace-js

Package Overview
Dependencies
Maintainers
7
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backtrace-js - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

34

lib/index.js

@@ -5,6 +5,6 @@ exports.report = report;

var myVersion = "0.0.6"; // should match package.json
var myVersion = "0.0.11"; // should match package.json
var initialized = false;
var uuidArray = new Uint8Array(16);
var crypto = window.crypto || window.msCrypto;
var pageStartTime = new Date();

@@ -22,2 +22,3 @@ var stackLineRe = /\s+at (.+) \((.+):(\d+):(\d+)\)/;

var sampling;
var crypto;

@@ -31,3 +32,26 @@ function report(err, attributes, callback) {

function validateWindow() {
try {
window;
window.crypto || window.msCrypto;
window.addEventListener;
XMLHttpRequest;
} catch (e) {
console.error(
new Error(
[
e.message || "",
"Backtrace-JS requires a standard web-browser window object.",
"Consider Backtrace-Node for non web-browser based javascript applications"
].join("\n")
).stack
);
return false;
}
return true;
}
function initialize(options) {
if (!validateWindow()) return;
options = options || {};

@@ -44,2 +68,4 @@

crypto = window.crypto || window.msCrypto;
var disableGlobalHandler = !!options.disableGlobalHandler;

@@ -100,4 +126,4 @@ var handlePromises = !!options.handlePromises;

"user.agent": navigator.userAgent,
"hostname": window.location && window.location.hostname,
"referer": window.location && window.location.href
hostname: window.location && window.location.hostname,
referer: window.location && window.location.href
},

@@ -104,0 +130,0 @@ userAttributes

2

package.json
{
"name": "backtrace-js",
"version": "0.0.10",
"version": "0.0.11",
"description": "Backtrace.io error reporting tool for client-side applications",

@@ -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