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.4.21 to 0.4.22

5

lib/index.js

@@ -191,3 +191,4 @@ "use strict";

libraries: (state.opts.additionalLibraries || []).concat('prop-types'),
classNameMatchers: classNameMatchers
classNameMatchers: classNameMatchers,
createReactClassName: state.opts.createReactClassName || 'createReactClass'
};

@@ -230,3 +231,3 @@

return currentNode.get('callee').node.name === 'createReactClass';
return currentNode.get('callee').node.name === globalOptions.createReactClassName || currentNode.get('callee').node.property.name === 'createClass';
});

@@ -233,0 +234,0 @@

2

package.json
{
"name": "babel-plugin-transform-react-remove-prop-types",
"version": "0.4.21",
"version": "0.4.22",
"description": "Remove unnecessary React propTypes from the production build",

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

@@ -228,2 +228,18 @@ # babel-plugin-transform-react-remove-prop-types

### `createReactClassName`
Use this option to set a custom name for the import of the `create-react-class` package that is different than `createReactClass`.
Given this example:
```js
import createClass from 'create-react-class';
```
You would use:
```js
createReactClassName: 'createClass'
```
## Is it safe?

@@ -230,0 +246,0 @@

@@ -178,2 +178,3 @@ /* eslint-disable global-require, import/no-dynamic-require */

classNameMatchers,
createReactClassName: state.opts.createReactClassName || 'createReactClass',
}

@@ -225,3 +226,6 @@

return currentNode.get('callee').node.name === 'createReactClass'
return (
currentNode.get('callee').node.name === globalOptions.createReactClassName ||
currentNode.get('callee').node.property.name === 'createClass'
)
})

@@ -228,0 +232,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