1.0.8 • Published 2 years ago

js-error-collection v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

js-error-collection

English | 中文

It is used to collect various logs during the running process of js, so as to find online problems in time and improve the coding quality

Install

pnpm i js-error-collection -S

Github Address

https://github.com/jzfai/package-develop-template

Using

####main.ts
import { jsErrorCollection } from 'js-error-collection'

jsErrorCollection({runtimeError:true, rejectError:true, consoleError:false}, (errLog) => {
console.log(errLog)
//send ajax req to save the error
})

props instruction

runtimeError:Whether to collect runtime errors and resource loading errors,defalut:true
rejectError: Whether to collect reject errors,  defalut:true
consoleError:Whether to collect errors printed by console.error, defalut:false
unhandledCodeArr: Do not capture status codes, defalut [403,401]
unhandledStringArr: Do not capture string, defalut ["cancel"] 

discussion and exchange

WeChat group

MIT license.

Copyright (c) 2022-present kuanghua

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago