react-badly
Advanced tools
Comparing version 1.0.4 to 1.0.5
/** | ||
* react-badly v1.0.4 | ||
* react-badly v1.0.5 | ||
* https://github.com/maniator/react-badly#readme | ||
@@ -92,2 +92,3 @@ * @author Naftali Lubin <naftalilubin@gmail.com> | ||
}(PureComponent); | ||
ReactBadly.propTypes = { | ||
@@ -102,3 +103,1 @@ children: PropTypes.node.isRequired, | ||
}; | ||
export { ReactBadly }; |
/** | ||
* react-badly v1.0.4 | ||
* react-badly v1.0.5 | ||
* https://github.com/maniator/react-badly#readme | ||
@@ -10,4 +10,2 @@ * @author Naftali Lubin <naftalilubin@gmail.com> | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
@@ -99,2 +97,3 @@ | ||
}(react.PureComponent); | ||
ReactBadly.propTypes = { | ||
@@ -109,3 +108,1 @@ children: PropTypes.node.isRequired, | ||
}; | ||
exports.ReactBadly = ReactBadly; |
/** | ||
* react-badly v1.0.4 | ||
* react-badly v1.0.5 | ||
* https://github.com/maniator/react-badly#readme | ||
@@ -8,2 +8,2 @@ * @author Naftali Lubin <naftalilubin@gmail.com> | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("@babel/runtime/helpers/classCallCheck")),t=r(require("@babel/runtime/helpers/createClass")),n=r(require("@babel/runtime/helpers/assertThisInitialized")),o=r(require("@babel/runtime/helpers/inherits")),i=r(require("@babel/runtime/helpers/possibleConstructorReturn")),u=r(require("@babel/runtime/helpers/getPrototypeOf")),c=r(require("@babel/runtime/helpers/defineProperty")),a=require("react"),s=r(require("prop-types"));function l(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,n=u(r);if(e){var o=u(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)}}var f=function(){return null},p=function(r){return r&&"[object Function]"===Object.prototype.toString.call(r)},h=function(r){o(u,r);var i=l(u);function u(){var r;e(this,u);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return r=i.call.apply(i,[this].concat(o)),c(n(r),"state",{hasError:!1}),r}return t(u,[{key:"componentDidCatch",value:function(r,e){var t=this.props.onError,n=p(t)?t:f;this.setState({hasError:!0,errorInformation:{error:r,info:e}},(function(){n(r,e)}))}},{key:"render",value:function(){var r=this.props,e=r.render,t=r.children,n=this.state,o=n.hasError,i=n.errorInformation;return o?p(e)?e(i):null:t}}]),u}(a.PureComponent);h.propTypes={children:s.node.isRequired,onError:s.func,render:s.func},h.defaultProps={onError:f,render:f},exports.ReactBadly=h; | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var e=r(require("@babel/runtime/helpers/classCallCheck")),t=r(require("@babel/runtime/helpers/createClass")),n=r(require("@babel/runtime/helpers/assertThisInitialized")),o=r(require("@babel/runtime/helpers/inherits")),i=r(require("@babel/runtime/helpers/possibleConstructorReturn")),u=r(require("@babel/runtime/helpers/getPrototypeOf")),c=r(require("@babel/runtime/helpers/defineProperty")),a=require("react"),s=r(require("prop-types"));function l(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,n=u(r);if(e){var o=u(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)}}var f=function(){return null},p=function(r){return r&&"[object Function]"===Object.prototype.toString.call(r)},h=function(r){o(u,r);var i=l(u);function u(){var r;e(this,u);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return r=i.call.apply(i,[this].concat(o)),c(n(r),"state",{hasError:!1}),r}return t(u,[{key:"componentDidCatch",value:function(r,e){var t=this.props.onError,n=p(t)?t:f;this.setState({hasError:!0,errorInformation:{error:r,info:e}},(function(){n(r,e)}))}},{key:"render",value:function(){var r=this.props,e=r.render,t=r.children,n=this.state,o=n.hasError,i=n.errorInformation;return o?p(e)?e(i):null:t}}]),u}(a.PureComponent);h.propTypes={children:s.node.isRequired,onError:s.func,render:s.func},h.defaultProps={onError:f,render:f}; |
{ | ||
"name": "react-badly", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Error boundary react component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12928
183