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

bugsnag-browser-lite

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bugsnag-browser-lite - npm Package Compare versions

Comparing version

to
1.1.1

4

dist/bugsnag-browser-lite.cjs.development.js

@@ -47,3 +47,4 @@ 'use strict';

function sendReport(report, cb = () => {}) {
if (typeof XMLHttpRequest !== "undefined") {
console.log('report', report)
if (typeof XMLHttpRequest !== "undefined" && false) {
try {

@@ -196,2 +197,3 @@ const url = config.notifyUrl;

function notify(error, opts) {
console.log('error', error)
sendReport(prepareBugsnagReport(config, error, opts));

@@ -198,0 +200,0 @@ }

{
"name": "bugsnag-browser-lite",
"version": "1.1.0",
"description": "",
"version": "1.1.1",
"description": "Bugsnag error reporting on the browser",
"main": "./dist/index.js",

@@ -19,5 +19,15 @@ "module": "dist/bugsnag-browser-lite.esm.js",

},
"keywords": [],
"author": "",
"license": "ISC",
"keywords": [
"bugsnag",
"browser",
"logger",
"lite",
"light"
],
"author": "Mukesh Soni",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/mukeshsoni/bugsnag-browser-lite.git"
},
"devDependencies": {

@@ -24,0 +34,0 @@ "@babel/preset-env": "^7.9.5",

@@ -9,11 +9,18 @@ bugsnag-browser-lite is a light weight replacement for [@bugsnag/js](https://github.com/bugsnag/bugsnag-js).

### Usage
### Installation
```
import { init } from 'bugsnag-browser-lite';
npm install bugsnag-browser-lite -save-dev
```
const bugsnagClient = init('your-bugsnag-api-key')
### Usage
```
import { bugsnag } from 'bugsnag-browser-lite';
const bugsnagClient = bugsnag('your-bugsnag-api-key')
// on error, call notify
bugsnagClient.notify(error, { metaData: additionalInformation });
```
It's written in typescript and the types are published with the package.