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

@desole/client

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@desole/client

Client side library for Desole.io

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
3
Weekly downloads
 
Created
Source

Desole browser collector client

This project contains the code for the Desole browser client collector. Check out desole.io for more information on how to set up the back-end.

Installing

You can either grab the code from this repository, install it using NPM, or use the CDN version:

Configuring the HTML page

Add this snippet before any other scripts in your HTML document, and replace the path to the client JS and the API URL:

<script src="CLIENT-LIBRARY-PATH" crossorigin="anonymous" integrity="INTEGRITY-HASH"></script>
<script>
  var desole = new Desole({
    url: 'https://DESOLE-API-URL', 
    app: {
      name: 'Desole test',
      version: '1.0.0',
      stage: 'test'
    }
  })
</script>

This will make Desole automatically track unhandled errors on the page, as well as script loading errors. Make sure to add the block to the end of the HEAD element

To track errors manually, use instance created with new Desole and call the captureException to send an exception object or a promise rejection to the collector API:

try {
  throw new Error('capturedException');
} catch (e) {
  window.desole.captureException(e);
}

Keywords

FAQs

Package last updated on 13 May 2018

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

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