prop-types icon indicating copy to clipboard operation
prop-types copied to clipboard

Thank You & Special characters bug

Open Sinius15 opened this issue 8 years ago • 0 comments

Thanks for this great tool! It saved me a lot of time.

One miner error i found is that json varables with special character are not escaped. The following input

{
"foo-bar": "100"
}

gives back invalid javascript code:

React.PropTypes.shape({
  foo-bar: React.PropTypes.string
});

the expected output would be:

React.PropTypes.shape({
    'foo-bar': React.PropTypes.string
});

Sinius15 avatar Dec 30 '16 12:12 Sinius15