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

react-class

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-class - npm Package Compare versions

Comparing version 1.2.0 to 1.2.2

2

dist/index.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ReactClass=e(require("React")):t.ReactClass=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function u(t){var e=t.constructor.prototype,r=Object.getOwnPropertyNames(e).filter(function(t){return"constructor"!=t&&"render"!=t&&"function"==typeof e[t]});return r.push("setState"),r.forEach(function(e){t[e]=t[e].bind(t)}),t}var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=function(t,e,r){for(var n=!0;n;){var o=t,u=e,a=r;c=s=i=void 0,n=!1,null===o&&(o=Function.prototype);var c=Object.getOwnPropertyDescriptor(o,u);if(void 0!==c){if("value"in c)return c.value;var i=c.get;return void 0===i?void 0:i.call(a)}var s=Object.getPrototypeOf(o);if(null===s)return void 0;t=s,e=u,r=a,n=!0}},i=r(2),s=r(1),l=function(t){function e(t){n(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t),u(this)}return o(e,t),a(e,[{key:"prepareProps",value:function(t){var e=s({},t);return e.style=this.prepareStyle(e),e.className=this.prepareClassName(e),e}},{key:"prepareClassName",value:function(t){var e=t.className||"",r=this.constructor.defaultProps;return null!=r.defaultClassName&&(e+=" "+r.defaultClassName),e}},{key:"prepareStyle",value:function(t){var e;return this.constructor.defaultProps&&(e=this.constructor.defaultProps.defaultStyle),s({},e,t.style)}}]),e}(i.Component);t.exports=l},function(t,e){"use strict";function r(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(t){var e=Object.getOwnPropertyNames(t);return Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t))),e.filter(function(e){return o.call(t,e)})}var o=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(t,e){for(var o,u,a=r(t),c=1;c<arguments.length;c++){o=arguments[c],u=n(Object(o));for(var i=0;i<u.length;i++)a[u[i]]=o[u[i]]}return a}},function(e,r){e.exports=t}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ReactClass=e(require("React")):t.ReactClass=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}function u(t){var e=t.constructor.prototype,r=Object.getOwnPropertyNames(e).filter(function(t){return"constructor"!=t&&"render"!=t&&"function"==typeof e[t]});return r.push("setState"),r.forEach(function(e){t[e]=t[e].bind(t)}),t}var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=function(t,e,r){for(var n=!0;n;){var o=t,u=e,a=r;c=s=i=void 0,n=!1,null===o&&(o=Function.prototype);var c=Object.getOwnPropertyDescriptor(o,u);if(void 0!==c){if("value"in c)return c.value;var i=c.get;return void 0===i?void 0:i.call(a)}var s=Object.getPrototypeOf(o);if(null===s)return void 0;t=s,e=u,r=a,n=!0}},i=r(2),s=r(1),l=function(t){function e(t){n(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t),u(this)}return o(e,t),a(e,[{key:"prepareProps",value:function(t){var e=s({},t);return e.style=this.prepareStyle(e),e.className=this.prepareClassName(e),e}},{key:"prepareClassName",value:function(t){var e=t.className||"",r=this.constructor.defaultProps;return r&&null!=r.defaultClassName&&(e+=" "+r.defaultClassName),e}},{key:"prepareStyle",value:function(t){var e;return this.constructor.defaultProps&&(e=this.constructor.defaultProps.defaultStyle),s({},e,t.style)}}]),e}(i.Component);t.exports=l},function(t,e){"use strict";function r(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(t){var e=Object.getOwnPropertyNames(t);return Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t))),e.filter(function(e){return o.call(t,e)})}var o=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(t,e){for(var o,u,a=r(t),c=1;c<arguments.length;c++){o=arguments[c],u=n(Object(o));for(var i=0;i<u.length;i++)a[u[i]]=o[u[i]]}return a}},function(e,r){e.exports=t}])});

@@ -57,3 +57,3 @@ 'use strict';

if (defaultProps.defaultClassName != null) {
if (defaultProps && defaultProps.defaultClassName != null) {
className += ' ' + defaultProps.defaultClassName;

@@ -60,0 +60,0 @@ }

{
"name": "react-class",
"version": "1.2.0",
"version": "1.2.2",
"description": "A carefully crafted base class for all your React components ",

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

@@ -44,3 +44,3 @@ 'use strict';

if (defaultProps.defaultClassName != null){
if (defaultProps && defaultProps.defaultClassName != null){
className += ' ' + defaultProps.defaultClassName

@@ -47,0 +47,0 @@ }

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