Gathering detailed insights and metrics for kind2string
Gathering detailed insights and metrics for kind2string
Gathering detailed insights and metrics for kind2string
Gathering detailed insights and metrics for kind2string
npm install kind2string
pretty-proptypes@1.3.0
Published on 04 Jul 2021
extract-react-types-loader@1.0.0
Published on 09 Jun 2021
extract-react-types@0.30.2
Published on 25 May 2021
extract-react-types@0.30.1
Published on 20 Apr 2021
pretty-proptypes@1.2.0
Published on 08 Mar 2021
extract-react-types@0.30.0
Published on 05 Mar 2021
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
180 Stars
270 Commits
28 Forks
7 Watching
39 Branches
83 Contributors
Updated on 13 Nov 2024
Minified
Minified + Gzipped
JavaScript (98.77%)
TypeScript (1.23%)
Cumulative downloads
Total Downloads
Last day
100%
102
Compared to previous day
Last week
51.6%
570
Compared to previous week
Last month
43.8%
2,781
Compared to previous month
Last year
-44.1%
45,248
Compared to previous year
1
2
One stop shop to document your react components.
npm install --save-dev babel-plugin-extract-react-types pretty-proptypes
1export interface AvatarPropTypes { 2 /** Provides a url for avatars being used as a link. */ 3 href?: string; 4 /** Defines the size of the avatar */ 5 size?: 'small' | 'medium' | 'large'; 6 /** Name will be displayed in a tooltip */ 7 name?: string; 8 /** A url to load an image from (this can also be a base64 encoded image). */ 9 src?: string; 10 /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */ 11 testId?: string; 12}
pretty-proptypes can display props from two sources.
Option 1. Using babel-plugin-extract-react-types and passing the component to Props
.babelrc
1{ 2 "plugins": ["babel-plugin-extract-react-types"] 3}
1import Props from 'pretty-proptypes'; 2import MyCoolComponent from '../MyCoolComponent'; 3 4<Props heading="My Cool Component" component={MyCoolComponent} />;
Option 2. Directly passing a component's props to Props with extract-react-types-loader or getting types from extract-react-types and writing it to a file
1import Props from 'pretty-proptypes'; 2 3<Props 4 heading="My Cool Component" 5 props={require('!!extract-react-types-loader!../MyCoolComponent')} 6/>;
This analyses prop type definitions, and default props. It creates descriptions from comments before the type definitions, and will render markdown syntax using react-markings.
Pull requests, issues and comments welcome - please read our contributing guidelines and our code of conduct.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 7/20 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
85 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More