
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
turbo-downloader
Advanced tools
Fastest file downloader for Node.js, using "by all means" downloading principle. Your file will be downloaded even in the worst conditions.
Fastest file downloader for Node.js, using "by all means" downloading principle. Your file will be downloaded even in the worst conditions.
Features:
$ npm install --save turbo-downloader
import TurboDownloader from 'turbo-downloader';
const downloader = new TurboDownloader({
url: 'https://example.com/my_file',
destFile: '/some/path/to/save',
chunkSize: 16 * 1024 * 1024, // Size of chunk (default 16MB)
concurrency: 8, // Number of connections (default 4)
retryCount: 10, // Number of downloading retries of each chunk (default 10)
canBeResumed: true, // If true, you can resume download next time if current download failed (downloader save .turbodownload file near destination file)
transformStream: (stream: stream.Readable) => stream.Readable // Transform input data (decrypt, for example)
});
downloader
.download((downloaded, total) =>{
console.log(`Downloaded ${downloaded} of ${total}`);
})
.then(() => console.log('Done'));
// Abort downloading
downloader.abort(true /* if true, you can resume downloading next time (downloader save .turbodownload file near destination file) */);
TurboDownloader class implements EventEmitter interface with next events:
downloadStarted: (url: string, destination: string) => void,
downloadFinished: (url: string, destination: string) => void,
downloadError: (url: string, destination: string) => void,
chunkDownloadStarted: (chunk: DownloadingChunk, attemptNumber: number) => void,
chunkDownloadProgress: (chunk: DownloadingChunk) => void,
chunkDownloadFinished: (chunk: DownloadingChunk, attemptNumber: number) => void,
chunkDownloadError: (chunk: DownloadingChunk, attemptNumber: number, error: any) => void,
planReady: (plan: DownloadingPlan) => void,
aborted: () => void,
reservingSpaceStarted: (size: number) => void,
reservingSpaceFinished: (size: number) => void,
Example:
const downloader = new TurboDownloader({
url: 'https://example.com/my_file',
destFile: '/some/path/to/save',
chunkSize: 16 * 1024 * 1024, // Size of chunk (default 16MB)
concurrency: 8, // Number of connections (default 4)
retryCount: 10, // Number of downloading retries of each chunk (default 10)
canBeResumed: true, // If true, you can resume download next time if current download failed (downloader save .turbodownload file near destination file)
transformStream: (stream: stream.Readable) => stream.Readable // Transform input data (decrypt, for example)
});
downloader.on('chunkDownloadStarted', (chunk) => {
console.log('Start chunk downloading', chunk.disposition);
});
await downloader.download();
Move to 'node:fs/promises' API
FAQs
Fastest file downloader for Node.js, using "by all means" downloading principle. Your file will be downloaded even in the worst conditions.
The npm package turbo-downloader receives a total of 20 weekly downloads. As such, turbo-downloader popularity was classified as not popular.
We found that turbo-downloader 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.