Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
prop-types-nullable
Advanced tools
Readme
Small convenience function for
prop-types
which allows
explicitly null props but rejects omissions.
npm install --save prop-types-nullable
This builds on top of
prop-types
,
so see that project's documentation for the basics of the API.
Simple usage:
const nullable = require('prop-types-nullable');
MyReactClass.propTypes = {
foobar: nullable(PropTypes.func).isRequired,
};
// foobar is now a required property, but can be explicitly null
It is possible to use nullable
without isRequired
, but this is
pointless (as null will be allowed for a non-required property anyway).
This project maintains the need for isRequired
for consistency with
the prop-types
API, and to better integrate with linting rules.
See https://github.com/facebook/react/issues/3163 for a discussion
around adding similar functionality to the core prop-types
project.
FAQs
a small convenience function for allowing explicitly null props with the prop-types package
The npm package prop-types-nullable receives a total of 153 weekly downloads. As such, prop-types-nullable popularity was classified as not popular.
We found that prop-types-nullable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.