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

Bugsnag error reporting on the browser

2.0.3
latest
Source
npm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

bugsnag-browser-lite is a light weight replacement for @bugsnag/js.

@bugsnag/js does a lot of stuff and works in both browser and nodejs. This makes the library very large. I made bugsnag-browser-lite which can be used only in the browser and is significantly smaller than @bugsnag/js.

This library does not yet have auto notification on unhandled errors and exceptions.

Installation

npm install bugsnag-browser-lite -save-dev

Usage

import bugsnag from 'bugsnag-browser-lite';

const bugsnagClient = bugsnag('your-bugsnag-api-key')

// on error, call notify
bugsnagClient.notify(error, { metaData: additionalInformation });

Catching and logging all unhandled exceptions in react.

import bugsnag, { ErrorBoundary } from 'bugsnag-browser-lite';

const bugsnagClient = bugsnag('your-bugsnag-api-key')

<ErrorBoundary bugsnagClient={bugsnagClient}> >
  <YourApp />
</ErrorBoundary>

It's written in typescript and the types are published with the package.

Keywords

bugsnag

FAQs

Package last updated on 13 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts