Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
single-line-log
Advanced tools
Keep writing to the same line in the terminal. Very useful when you write progress bars, or a status message during longer operations
Node.js module that keeps writing to the same line in the console (or a stream). Very useful when you write progress bars, or a status message during longer operations. Supports multilines.
npm install single-line-log
var log = require('single-line-log').stdout;
// or pass any stream:
// var log = require('single-line-log')(process.stdout);
var read = 0;
var size = fs.statSync('super-large-file').size;
var rs = fs.createReadStream('super-large-file');
rs.on('data', function(data) {
read += data.length;
var percentage = Math.floor(100*read/size);
// Keep writing to the same two lines in the console
log('Writing to super large file\n[' + percentage + '%]', read, 'bytes read');
});
Clears the log (i.e., writes a newline).
var log = require('single-line-log').stdout;
log('Line 1');
log.clear();
log('Line 2');
Outputs to process.stdout
.
Outputs to process.stderr
.
MIT
FAQs
Keep writing to the same line in the terminal. Very useful when you write progress bars, or a status message during longer operations
The npm package single-line-log receives a total of 37,590 weekly downloads. As such, single-line-log popularity was classified as popular.
We found that single-line-log 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.