Socket
Socket
Sign inDemoInstall

@58fe/ems-plugins

Package Overview
Dependencies
Maintainers
9
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@58fe/ems-plugins

esm vue react


Version published
Maintainers
9
Created
Source

#EMS 系统异常捕获插件

安装

使用 npm:

$ npm install @58fe/ems-plugins

使用

捕获系统错误

import '@58fe/ems-plugins/lib/system';

捕获 Jquery&Zepto$Requirejs

import '@58fe/ems-plugins/lib/jquery';

捕获 Vue

import VueErrorHandlerPlugins from '@58fe/ems-plugins/lib/vue';

Vue.use(VueErrorHandlerPlugins);

PS:通过设置参数{throwError:{true|false}},来实现是否在console中打印错误,让用户有所感知:

Vue.use(VueErrorHandlerPlugins,{throwError:true});

捕获 React

import ErrorBoundary from '@58fe/ems-plugins/lib/react';

ReactDOM.render(
	<ErrorBoundary>
		<App />
	</ErrorBoundary>,
	document.getElementById('root')
);

FAQs

Package last updated on 11 Dec 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