/ never-odd-or-even / back / node_modules / airbnb-prop-types /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]build-test/2 years ago -  
[DIR]build/2 years ago -  
[DIR]src/2 years ago -  
[DIR]test/2 years ago -  
[TXT]CHANGELOG.md40 years ago9.9K 
[   ]LICENSE40 years ago1.0K 
[TXT]README.md40 years ago9.1K 
[   ]index.js40 years ago138  
[   ]index.js.map40 years ago326  
[   ]package.json2 years ago4.3K 
README.md

prop-types Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

Custom React PropType validators that we use at Airbnb. Use of airbnb-js-shims or the equivalent is recommended.

Production

Since PropTypes are typically not included in production builds of React, this library’s functionality serves no useful purpose. As such, when the NODE_ENV environment variable is "production", instead of exporting the implementations of all these prop types, we export mock functions - in other words, something that ensures that no exceptions are thrown, but does no validation. When environment variables are inlined (via a browserify transform or webpack plugin), then tools like webpack or uglify are able to determine that only the mocks will be imported - and can avoid including the entire implementations in the final bundle that is sent to the browser. This allows for a much smaller ultimate file size, and faster in-browser performance, without sacrificing the benefits of PropTypes themselves.

Tests

Clone the repo, npm install, npm run react, and run npm test

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80