Package Exports
- pizza-guy
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pizza-guy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pizza-guy
If you already have a big list of urls of files that you want to download but you don't know how, this is your module.
The idea is to support really big lists of files that would be insane to download simultaneusly since Node would break for this kind of cases. Hope others to support this cause. ✌🏻
How to use
Require / Import
import pizzaGuy from 'pizza-guy';
// OR
var pizzaGuy = require('pizza-guy');Prepare your data
const images = [
'http://some.domain.com/file0.jpg',
'https://some.domain.com/file1.gif',
'https://some.domain.com/file2.png'
];Execute
pizzaGuy
// Pass an array of strings containing urls...
.deliver(images)
// Absolute or relative path to save these files...
.onAddress('./some-path')
// Will trigger per file...
.onSuccess((info) => {
console.log(`${info.fileName} succeed!`);
})
// Will trigger per file that failed..
.onError((info) => {
console.log(`${info.fileName} failed`);
})
// Initialize the utility!
.start();Want a demo?
You can try out this module without any hassle. Just run npm run demo and you're all set.
Demo files are located in demo/index.js and downloaded images will be located in demo/downloaded-images
How to contribute
This project is opened to everyone to contribute. If you want to, please read our To-Do list and also about and
since the build is relying on these to test and publish automatically on NPM.
To Do List
If someone out there wants to collaborate in this project, please take into consideration our To Do list. Also, add any item that you think would be useful.
Items are written in order of priority:
- Integration test using mock server or similar.
- Increase code coverage index.
Might Do List
List of items that we might do but we haven't decided yet.
- Use RxJS internally without affecting the existing API.
- Expose an optional Obserbable API for RxJS users.
Issues / bugs
We are working once on a while in this small library. Please report an issue here and we'll take a look as soon as we can.