Socket
Socket
Sign inDemoInstall

react-conditional-component

Package Overview
Dependencies
42
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.1.5

.idea/.name

12

package.json
{
"name": "react-conditional-component",
"version": "0.1.4",
"version": "0.1.5",
"description": "This component displays its children only if they satisfy their predicate",
"main": "react-conditional-component.jsx",
"main": "react-conditional-component.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "node_modules/.bin/babel --stage 1 ./react-conditional-component.jsx --out-file ./react-conditional-component.js"
},

@@ -26,4 +27,7 @@ "repository": {

"peerDependencies": {
"react": "0.12.x"
"react": ">= 0.11.1 < 1"
},
"devDependencies": {
"babel": "^5.6.7"
}
}

@@ -0,9 +1,13 @@

/**
* @jsx React.DOM
*/
var React = require('react');
module.exports = React.createClass({
displayName: 'ConditionalComponent',
render: function() {
var value = this.props.value;
var shown = [];
let value = this.props.value;
let shown = [];
React.Children.forEach(this.props.children, function(child) {
var show = true;
let show = true;
if (show && child.props.showIfDefined) {

@@ -10,0 +14,0 @@ show = typeof value !== 'undefined';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc