Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@darkobits/adeiu
Advanced tools
Yet another POSIX signal handler.
npm i @darkobits/adeiu
Adeiu accepts an asynchronous or synchronous handler function and returns a function that can be invoked to unregister the handler. By default, the handler will be registered to respond to the following signals:
SIGINT
SIGQUIT
SIGTERM
SIGUSR2
import adeiu from '@darkobits/adeiu';
// Register a callback.
const annuler = adeiu(async signal => {
console.log(`Hey, we got ${signal}. Exiting...`);
await someAsyncStuff();
console.log('All done!');
});
// Un-register the callback.
annuler();
Usually, responding to signals dynamically can be accomplished by inspecting the signal
argument
passed to your callback. However, if it is important that listeners are only installed on a particular
signal, you may optionally provide a custom array of signals to assign a callback to.
import adeiu from '@darkobits/adeiu';
// Register callback that will _only_ be invoked on SIGINT.
adeiu(() => {
// SIGINT cleanup tasks.
}, ['SIGINT']);
import adeiu, { SIGNALS } from '@darkobits/adeiu';
// Register callback with the default signals and SIGUSR1.
adeiu(() => {
// Custom cleanup tasks.
}, [...SIGNALS, 'SIGUSR1']);
FAQs
Yet another POSIX signal handler.
The npm package @darkobits/adeiu receives a total of 109 weekly downloads. As such, @darkobits/adeiu popularity was classified as not popular.
We found that @darkobits/adeiu 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.