Skip to content

transform-it/babel-plugin-json-to-proptypes

Repository files navigation

babel-plugin-json-to-proptypes

Convert JSON to React PropTypes

Online REPL is available at https://transform.now.sh/

Installation

npm i -D babel-plugin-json-to-proptypes

Usage

import { transform } from "babel-core"
import jsonToProptypes from "babel-plugin-json-to-proptypes"

const json = `{
  a: 'b'
}`

const { code } = transform(json, {
  plugins: [jsonToProptypes]
})

console.log(code)

// const propTypes = {
//  a: PropTypes.string  
// }

License

MIT @ Ritesh Kumar

Contributors

Thanks goes to these wonderful people (emoji key):


Ritesh Kumar

📖 💻 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Convert JSON to React PropTypes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published