Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

remove-react-proptypes

1.0.0 • Public • Published

remove-react-proptypes

Remove React PropTypes. Removes all occurrences of <component>.propTypes = <types>.

Installation

npm install --save-dev remove-react-proptypes

Or install the CLI globally:

npm install --global remove-react-proptypes

Usage

CLI:

remove-react-proptypes input.js > output.js
# or pipe to stdin: 
cat input.js | remove-react-proptypes | uglifyjs -o output.js

Node:

const removeReactPropTypes = require('remove-react-proptypes')
const outputString = removeReactPropTypes(inputString)

Node.js streams:

const removeReactPropTypes = require('remove-react-proptypes/stream')
fs.createReadStream('input.js')
  .pipe(removeReactPropTypes())
  .pipe(fs.writeReadStream('output.js'))

Browserify:

browserify -g remove-react-proptypes/stream -input.js > output.js

License

MIT

Keywords

install

npm i remove-react-proptypes

Downloadsweekly downloads

17

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability