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

@ued2345/octopus-util

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ued2345/octopus-util - npm Package Compare versions

Comparing version 1.1.6-0 to 1.1.6-3

2

package.json
{
"name": "@ued2345/octopus-util",
"version": "1.1.6-0",
"version": "1.1.6-3",
"description": "ued2345 utils",

@@ -5,0 +5,0 @@ "main": "dist/octopus-util.min.js",

@@ -98,2 +98,37 @@ ### 技术选型

#### 错误收集
> * window.onerror
> * 资源加载失败捕获
> * Vue组件错误捕获
> * Promise中没有catch捕获错误会被捕获
* vue项目中接入
```javascript
import Vue from 'vue'
import { CatchError} from "@ued2345/octopus-util";
CatchError.getInstance(Vue, {
reportFun: function(data) { // 错误上报
console.log('error:', data)
},
})
```
* 相关配置说明
```javascript
// 调用方法
CatchError.getInstance(Vue, opts)
/**
* Vue: null 不会捕获vue 错误信息
* opts: {
* isReportNow: boolean; //是否立即上报(是:delay时间后立即执行多次上报,否:每隔delay时间上报一次)
* delay: number; // 延迟多长时间上报(默认3000)
* random: number; // 抽样上报 (0-1)1全量(默认全量)
* repeatNum: number; // 重复上报次数(默认3次),
* reportUnhandledRejection: boolean; // 是否捕获promise.reject错误
* reportFun: CallBack; // 上报错误函数
* }
**/
```
### vue相关工具

@@ -157,2 +192,2 @@ ##### 埋点工具

<div v-else v-bang:mounted="`显示2`" key="显示2">显示2</div>
```
```
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