react-to-jsx
Advanced tools
Comparing version 1.1.0 to 1.2.0
14
index.js
@@ -33,4 +33,14 @@ var _ = require('lodash'); | ||
var props = _.chain(component.props) | ||
.omit('children') | ||
var matchingProps; | ||
if (component.type && component.type.defaultProps) { | ||
matchingProps = _.omit(component.props, function (val, key) { | ||
return component.type.defaultProps[key] === component.props[key]; | ||
}); | ||
} else { | ||
matchingProps = component.props; | ||
} | ||
var props = _.chain(matchingProps) | ||
.omit(['children']) | ||
.transform(function (result, prop, key) { | ||
@@ -37,0 +47,0 @@ if (_.isString(prop)) { |
{ | ||
"name": "react-to-jsx", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "author": "Alex Lande", |
4857
82