Socket
Socket
Sign inDemoInstall

@evo/errcatch

Package Overview
Dependencies
8
Maintainers
12
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.1.2

15

dist/index.js

@@ -7,3 +7,3 @@ "use strict";

exports.setErrCatchLog = setErrCatchLog;
exports.ErrCatch = void 0;
exports.withErrCatch = exports.ErrCatch = void 0;

@@ -121,2 +121,13 @@ var _react = _interopRequireDefault(require("react"));

name: 'Component render error'
});
});
var withErrCatch = function withErrCatch(Component, name) {
return function (props) {
var displayName = name || "ErrCatch".concat(Component.displayName);
return _react.default.createElement(ErrCatch, {
name: displayName
}, _react.default.createElement(Component, props));
};
};
exports.withErrCatch = withErrCatch;

2

package.json
{
"name": "@evo/errcatch",
"version": "0.0.5",
"version": "0.1.2",
"description": "Catch react errors",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -21,3 +21,3 @@ # ErrCatch

```jsx
import { ErrCatch } from '@evo/errcatch'
import { ErrCatch, withErrCatch } from '@evo/errcatch'

@@ -32,2 +32,9 @@ const Component = () => (

);
// or HOC
const Component = withErrCatch(() => (
<div>
<Component1/>
</div>
));
```

@@ -34,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc