
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
prop-types-nullable
Advanced tools
a small convenience function for allowing explicitly null props with the prop-types package
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 27 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.