Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.26 KB

Readme.md

File metadata and controls

45 lines (31 loc) · 1.26 KB

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!