+2
-2
| { | ||
| "name": "download", | ||
| "version": "0.1.0", | ||
| "description": "Download and extract files", | ||
| "version": "0.1.1", | ||
| "description": "Download and extract files effortlessly", | ||
| "keywords": [ | ||
@@ -6,0 +6,0 @@ "url", |
+19
-4
| # download [](http://travis-ci.org/kevva/download) | ||
| Downloading made easy. | ||
| Download and extract files effortlessly in Node.js. | ||
@@ -11,14 +11,29 @@ ## Getting started | ||
| If you're fetching an archive you can set `extract: true` in options and | ||
| it'll extract it for you. | ||
| ```js | ||
| var download = require('download'); | ||
| download('foo.tar.gz', 'bar'); | ||
| // => download and extract `foo.tar.gz` into `bar/` | ||
| // download and extract `foo.tar.gz` into `bar/` | ||
| download('foo.tar.gz', 'bar', { extract: true; }); | ||
| // download and save `foo.jpg` into `bar/foo.jpg` | ||
| download('foo.jpg', 'bar/foo.jpg'); | ||
| // => download and save `foo.jpg` into `bar/foo.jpg` | ||
| ``` | ||
| ## API | ||
| ### download(url, dest, opts) | ||
| Download a file to a given destination. | ||
| ## Options | ||
| * `extract` — If set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/). | ||
| You can also define options accepted by the [request](https://github.com/mikeal/request/) module. | ||
| ## License | ||
| [MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3175
18.82%39
62.5%