![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Remove undefined
properties from object.
N.B. Does not remove null
or falsy values, just undefined
.
$ npm install rundef
$ yarn add rundef
const rundef = require('rundef');
import rundef from 'rundef';
For the most accurate examples, see the test.js
file
const input = {
a: undefined,
b: 1
}
rundef(input); // { b: 1 }
rundef
supports two options:
mutate
boolean - if truthy, the original object will be mutated; if falsy, a new object will be constructed and returned. Defaults to false
recursive
boolean | int - whether rundef
should recursively process nested objects. If it's an integer, it will specify the number of nested layers, or levels, to process. If it is set to true
, it will recursively process all layers. Defaults to 0
, which is equivalent to false
.const input = {
a: undefined, // Level 0
b: {
c: 1,
d: undefined, // Level 1
e: {
f: undefined // Level 2
}
}
}
const output = rundef(
input,
false, // mutate - whether to mutate the original object or return a new one
1, // recursive - whether to apply recursively
);
output;
{ // Level 0
b: {
c: 1, // Level 1
e: {
f: undefined // Level 2 - Not removed as level 1 was specified
}
}
}
FAQs
Remove undefined properties from object
The npm package rundef receives a total of 0 weekly downloads. As such, rundef popularity was classified as not popular.
We found that rundef 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.