Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-props-to-json-ts

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-props-to-json-ts

react props to json schema

  • 1.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-props-to-json-ts

React props to json schema used for form-reder

Install

yarn add react-props-to-json-ts --dev

or

npm install --save-dev react-props-to-json-ts

How to use

const propsToJSON = require('react-props-to-json-ts');
// input file path
const result = propsToJSON('filename.tsx');

console.log(result);

API

(path, handleError)

argumenttyperequireddescription
pathstringtrueThe path of parsing file
handleError(err: any) => voidfalseCallback for handle the error

Note

  • The tool will skip the prop without @title tag.
  • The component also need a @title tag, otherwise will get null.
  • If props is empty, will get a null value.

Example

pls follow the exmaple

Support types

typeformat
unionselect
numberinput number
booleancheckbox
stringinput
objectauto
arrayauto
ReactNoderichtext

Keywords

FAQs

Package last updated on 09 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc