@lite-monitor/web
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@lite-monitor/web

An event tracking library for web browsers

Table of Contents

Background

LiteMonitor started with a database online examination real-time monitoring system. During the development of the system, I found that I needed an event tracking library that could meet the following characteristics:

  • Lightweight
  • Low invasiveness
  • Well defined
  • Good compatibility

As a result, I built a JavaScript library and published it to npm. In February 2021, I started developing version 1.0 of the project.

Installation

This library uses Node.js and its package manager. Please make sure they are installed locally.

$ npm install @lite-monitor/web

or

$ yarn add @lite-monitor/web

or

$ pnpm add @lite-monitor/web

Usage

This library can be used in CommonJS project and ESM project. Please refer to the Examples.

Examples

For web browsers

import { WebMonitor } from '@lite-monitor/web';

// Initialize
const monitor = new WebMonitor();

// Report error event
const error = new Error();
monitor.reportError(error);

For React

Please refer to the React Demo.

Related Efforts

Maintainers

@peidongxie

Contributing

Feel free to open an issue or PR.

License

MIT © 谢沛东

Readme

Keywords

Package Sidebar

Install

npm i @lite-monitor/web

Weekly Downloads

0

Version

1.2.1

License

MIT

Unpacked Size

42.4 kB

Total Files

12

Last publish

Collaborators

  • peidongxie