# calladownload-extract

> A simple tarball download and extraction lib for node.

Latest version **1.2.0** (published 2020-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install calladownload-extract
pnpm add calladownload-extract
yarn add calladownload-extract
bun add calladownload-extract
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-05-25 |
| First published | 2020-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 (+12 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | markwylde |
| Keywords | tar, tarball, download |

## Links

- npm: https://www.npmjs.com/package/calladownload-extract
- Repository: https://github.com/markwylde/calladownload-extract
- Homepage: https://github.com/markwylde/calladownload-extract#readme
- Issues: https://github.com/markwylde/calladownload-extract/issues
- npm.io page: https://npm.io/package/calladownload-extract

## Dependencies (3)

- [tar](https://npm.io/package/tar.md) ^6.0.2
- [unzipper](https://npm.io/package/unzipper.md) ^0.10.11
- [calladownload](https://npm.io/package/calladownload.md) ^1.1.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2020-05-25
- 1.1.0 — 2020-05-23
- 1.0.1 — 2020-05-23
- 1.0.0 — 2020-05-23

## README

calladownload-extract
===============

A simple tarball download and extraction lib for node.

## Install

    npm install calladownload-extract

## method: extractTarball(sourceFile, destination, callback)
Extracts a tar file using **node-tar**. If the file ends in a **.tgz** or a **tar.gz** gzip will be used to deflate it before passing the stream to tar.

    var tarball = require('calladownload-extract')
    tarball.extractTarball('/tmp/test.tar', '/tmp/test', function(err){
      if(err) console.log(err)
    })

## method: extractTarballDownload(url, downloadFile, destination, options, callback)
Download a tarball from a **url** and automatically extract it. 

    var tarball = require('calladownload-extract')
    url = 'http://example.com/testfile.tar.gz'
    tarball.extractTarballDownload(url , '/tmp/testfile.tar.gz', '/tmp/testfile', {}, function(err, result) {
      console.log(err, result)
    })

When the download is complete the callback is passed (err, info).

    { url: 'http://example.com/testfile.tar.gz',
      downloadFile: '/tmp/testfile.tar.gz',
      destination: '/tmp/testfile' }

---
_Source: https://npm.io/package/calladownload-extract · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
