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

babel-plugin-transform-react-remove-prop-types

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-react-remove-prop-types - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

lib/index.js

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

if (superClass.matchesPattern('React.Component') || superClass.node.name === 'Component') {
if (superClass.matchesPattern('React.Component') || superClass.node && superClass.node.name === 'Component') {
path.remove();

@@ -58,0 +58,0 @@ }

{
"name": "babel-plugin-transform-react-remove-prop-types",
"version": "0.2.2",
"version": "0.2.3",
"description": "Remove unnecessary React propTypes from the production build",

@@ -28,3 +28,2 @@ "main": "lib/index.js",

},
"homepage": "http://oliviertassinari.github.io/babel-plugin-transform-react-remove-prop-types/",
"dependencies": {

@@ -34,4 +33,4 @@ "babel-core": "^6.3.26"

"devDependencies": {
"babel-cli": "^6.3.17",
"babel-preset-es2015": "^6.3.13",
"babel-cli": "^6.6.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.3.13",

@@ -38,0 +37,0 @@ "babel-preset-stage-0": "^6.3.13",

@@ -41,3 +41,4 @@ import isStatelessComponent from './isStatelessComponent';

if (superClass.matchesPattern('React.Component') || superClass.node.name === 'Component') {
if (superClass.matchesPattern('React.Component') ||
superClass.node.name === 'Component') {
path.remove();

@@ -49,3 +50,4 @@ } else if (superClass.node.name) { // Check for inheritance

if (superClass.matchesPattern('React.Component') || superClass.node.name === 'Component') {
if (superClass.matchesPattern('React.Component') ||
(superClass.node && superClass.node.name === 'Component')) {
path.remove();

@@ -52,0 +54,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