
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
filedownloader
Advanced tools
a small module for easy downloading using the power of curl combined with node js
a small module for easy downloading using the power of curl combined with node js

this module requires curl to be present in your system path. if not please check those links
npm install filedownloader
Then:
var Downloader = require("filedownloader");
var Dl = new Downloader({
url: "FILEURL"
}).on("progress", function (progress){
console.log(progress);
});
The Downloader function accepts an object that can take:
url url to Download fromsaveas Filename to be saved as ex( audio.mp3)saveto Folder to be saved indeleteIfExists Delete file if it does exist (default: false)resume Resume file if it's not completed, if false will delete the file and start it again (default: true)The progress event will return :
{ progress: '1.3', dataWritten: 376072, filesize: '29828970', speed: 'byte/s'} //just an example of the ouput
you can pause the downloading by :
Dl.pause();
and you can resume it by:
Dl.resume();
The start event is emitted just after the download starts
Dl.on("start", function(){
console.log("Download started")
});
The progress Event is emitted with an object argument with the following keys:
dataWritten: size of downloaded data in bytesfilesize: size of the target file in bytesprogress: an estimation of the progress percentagespeed: an estimation of the download speed Dl.on("progress", function(progress){
console.log('Downloaded: ' + progress.pregress + '%');
});
The error event is emitted when an error occurs
Dl.on("error", function(err){
console.log('Some error occurred:' + err);
});
The end event is emitted when Downloading has finished.
Dl.on("end", function(){
console.log('Download finished');
});
error event when status code is different than 200
npm test
mkdir -pContributions welcome; Please submit all pull requests the against master branch. If your pull request contains JavaScript patches or features, you should include relevant unit tests. Please check the Contributing Guidelines for more details. Thanks!
Oussama Barkouki
FAQs
a small module for easy downloading using the power of curl combined with node js
We found that filedownloader demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.