
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
collapse-prototypes
Advanced tools
Return an object with prototype properties included as own properties (for serialization purposes)
Return an object with prototype properties included as own properties (for serialization purposes)
import collapse from 'collapse-prototypes';
let parent = {
foo: 1
};
let child = Object.create(parent);
child.bar = 2;
let collapsed = collapse(child);
console.log(collapsed); // { foo: 1, bar: 2 }
yarn add collapse-prototypes
collapse(obj, {
// useful if you're going to serialize, because `toJSON` and getters
// may not like the new prototype-less object
// Default value (false)
stripFunctions: true,
// speeds up collapsing if you don't need them
// Default value (false)
excludeNonenumerable: true,
// useful if you're going to stringify (uses `json-stringify-safe`)
// Default value (false)
dropCycles: true,
// prepend the debug log to differentiate calls using the `debug` package
// (DEBUG=collapse-prototypes)
// Default value ('')
debugLabel: 'obj'
});
FAQs
Return an object with prototype properties included as own properties (for serialization purposes)
We found that collapse-prototypes demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.