
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
JSON.parse(JSON.stringify(myObject)) and remove all nulls, undefined and empty strings
Does JSON.parse(JSON.stringify(myObject)) and removes all nulls, undefined and empty strings.
var groom = require('groom');
var o = {
a: 1,
b: '',
c: null,
d: undefined,
e: [
null,
undefined,
'test'
],
f: new Date(0),
g: /test/
};
console.log(groom(o));
//output:
{
a: 1,
e: ["test"],
f: '1970-01-01T00:00:00.000Z',
g: {}
}
Dates are .toString()'ed and regExp'es are turned into the empty object {}.
The original object stays the same. A copy without null, undefined and empty string is created.
FAQs
JSON.parse(JSON.stringify(myObject)) and remove all nulls, undefined and empty strings
The npm package groom receives a total of 104 weekly downloads. As such, groom popularity was classified as not popular.
We found that groom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.