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.
log-update-async-hook
Advanced tools
This is a fork of the log-update by Sindre Sorhus, that uses async-exit-hook
to restore terminal cursor state when the process terminates.
Usage of exit-hook
or signal-exit
hook in the original log-update
prevents execution of asynchronous operations on signals (SIGTERM
, SIGHUP
, etc.) in the code of the main application.
So I've replaced them by async-exit-hook
, rewritten code to allow execution on Node versions below 4.x
and bundled some dependencies into the package.
Log by overwriting the previous output in the terminal.
Useful for rendering progress bars, animations, etc.
$ npm install --save log-update
const logUpdate = require('log-update');
const frames = ['-', '\\', '|', '/'];
let i = 0;
setInterval(() => {
const frame = frames[i = ++i % frames.length];
logUpdate(
`
♥♥
${frame} unicorns ${frame}
♥♥
`
);
}, 80);
Log to stdout.
Clear the logged output.
Persist the logged output.
Useful if you want to start a new log session below the current one.
Log to stderr.
Get a logUpdate
method that logs to the specified stream.
MIT © Sindre Sorhus
FAQs
log-update fork that uses async-exit-hook internally
The npm package log-update-async-hook receives a total of 171,731 weekly downloads. As such, log-update-async-hook popularity was classified as popular.
We found that log-update-async-hook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
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.