bugsnag-browser-lite
Advanced tools
Comparing version
@@ -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. |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
135314
0.33%660
0.3%1
-50%26
36.84%1
-50%