Gathering detailed insights and metrics for email-prop-type
Gathering detailed insights and metrics for email-prop-type
Gathering detailed insights and metrics for email-prop-type
Gathering detailed insights and metrics for email-prop-type
@types/prop-types
TypeScript definitions for prop-types
prop-types
Runtime type checking for React props and similar objects.
define-lazy-prop
Define a lazily evaluated property on an object
babel-plugin-transform-react-remove-prop-types
Remove unnecessary React propTypes from the production build
npm install email-prop-type
91.5
Supply Chain
71
Quality
75.7
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
3 Stars
104 Commits
1 Forks
3 Watching
28 Branches
2 Contributors
Updated on 19 Apr 2021
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-43.9%
2,476
Compared to previous day
Last week
-4.3%
19,068
Compared to previous week
Last month
71.7%
88,946
Compared to previous month
Last year
10.8%
618,047
Compared to previous year
1
26
email-prop-type
This package is used to validate if a React Prop value is a valid email address.
Currently, there is no email prop type defined by the prop-types
package. While using PropType.string
works, why not be as specific as possible when validating your props?
Additionally, though it's relatively straightforward to create a custom prop type validator, if you need to implement similar prop type checking in multiple packages, you might not want to repeat yourself.
Depends on the email-validator
package.
1npm install --save email-prop-type
As mentioned above, email-prop-type
depends on the email-validator
package. You need to install this package as a peer dependency of email-prop-type
.
1import React from 'react'; 2import PropTypes from 'prop-types'; 3import emailPropType from 'email-prop-type'; 4 5// Create a basic Hyperlink Component with a mailto href value 6const Hyperlink = props => ( 7 <a href={`${mailto:props.emailAddress}`>{props.text}</a> 8); 9 10Hyperlink.propTypes = { 11 text: PropTypes.string.isRequired, 12 emailAddress: emailPropType.isRequired, // can also specify emailPropType if it is not required 13};
I didn't see many alternatives:
airbnb/prop-types
project has email validation.react-validator-prop-types
library but if you just want email validation, it might be too heavyweight.No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
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
65 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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