
Security News
AI Has Taken Over Open Source
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain
Gracefully exits a Node.js process when memory or CPU usage exceeds defined thresholds. Supports customizable exit logic via async hooks.
when your node.js process uses too much memory or cpu, allow it to gracefully exit
const euthanasia = require('euthanasia');
euthanasia({
memory: 100, // 100 MB limit
cpu: 80, // 80% CPU limit
interval: 10000, // check every 10 seconds
// called when either memory or CPU limit is exceeded
ready: async ({ memory, cpu }) => {
// your logic here
if (memory) {
console.log(`Memory limit exceeded: ${memory} MB`);
}
if (cpu) {
console.log(`CPU limit exceeded: ${cpu.toFixed(2)}%`);
}
// You can return false to skip exit (e.g., wait for cleanup)
return true;
}
});
npm i euthanasia --save
MIT
FAQs
Gracefully exits a Node.js process when memory or CPU usage exceeds defined thresholds. Supports customizable exit logic via async hooks.
The npm package euthanasia receives a total of 1 weekly downloads. As such, euthanasia popularity was classified as not popular.
We found that euthanasia demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain

Security News
npm invalidated all granular access tokens that bypass 2FA after a fresh Mini Shai-Hulud wave compromised 323 npm packages. Staged publishing also entered public preview.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.