cmyr-error-collection
TypeScript icon, indicating that this package has built-in type declarations

1.7.0 • Public • Published

cmyr-error-collection

Version GitHub Workflow Status node-current Documentation License: MIT

> 一个基于 leancloud 的简易全局错误捕获工具,会将未全局捕获的错误上报到 leancloud。 > > 也可以自定义上报的地址。

🏠 主页

依赖要求

  • node >=12

安装

yarn install

使用

// Node 端
// cjs 版本
const { ErrorCollection } = require('cmyr-error-collection') // index.js
// esm 版本
import { ErrorCollection } from 'cmyr-error-collection' // index.esm.js

//浏览器端
// 非 esm 版本 index.umd.js 
// <script src="./index.umd.js">
const ErrorCollection = window.CmyrErrorCollection.ErrorCollection
// esm 版本 index.esm.browser.js  <script type="module">
import { ErrorCollection } from './index.esm.browser.js'


ErrorCollection.init({
    projectName: '测试browser',
    appId: 'xxxxx',
    appKey: 'yyyy',
    // createObjectURL?: string。提交数据的地址,例如 https://api.example.com/1.1/classes/ErrorInfo。该地址为最高优先级,可自定义地址,然后处理提交的数据。提交方式为 POST
})

作者

👤 CaoMeiYouRen

🤝贡献

欢迎 Contributions, issues and feature!
如有问题请查看 issues page.

支持

如果觉得这个项目有用的话请给一颗⭐️,非常感谢

📝 License

Copyright © 2021 [CaoMeiYouRen](https://github.com/ CaoMeiYouRen).
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

Readme

Keywords

none

Package Sidebar

Install

npm i cmyr-error-collection

Weekly Downloads

1

Version

1.7.0

License

MIT

Unpacked Size

91.1 kB

Total Files

12

Last publish

Collaborators

  • cao-mei-you-ren