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

babel-plugin-remove-proptypes

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-remove-proptypes

Remove static declarations of React propTypes

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-remove-proptypes

Babel plugin for removing static declarations of React propTypes on classes.

Input:

// MyComponent extends React.Component
MyComponent.propTypes = {
  someString: React.PropTypes.string.isRequired,
  someBoolean: React.PropTypes.bool
};

Output:

// Does not contain any propTypes declarations

The plugin can be used to remove PropTypes from production environments, where they have no effect.

Installation

$ npm install babel-plugin-remove-proptypes

Usage

Via .babelrc

{
  "plugins": ["remove-proptypes"]
}

Via CLI

$ babel --plugins remove-proptypes script.js

Via Node API

require('babel-core').transform('code', {
  plugins: ['remove-proptypes']
});

Keywords

FAQs

Package last updated on 11 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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