1.0.13 • Published 3 months ago

downloader-util v1.0.13

Weekly downloads
59
License
ISC
Repository
github
Last release
3 months ago

downloader-util

Install

npm install downloader-util

Usage

import { download } from 'downloader-util';

const mypath = path.resolve(__dirname, 'tmp/a.mp4');
const url = 'http://vjs.zencdn.net/v/oceans.mp4';

download({
    url, filePath: mypath, onFailed: (error: string) => {
        console.log(`失败原因!!!:${error}`);
    },
    onSuccess: () => {
        console.log('文件下载成功!');
    },
    onProgress: (progress) => {
        console.log(`进度:${Math.floor(progress * 100)}%`);
    }
});
1.0.13

3 months ago

1.0.11

2 years ago

1.0.12

2 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago