# unrar

> Unrars rar archives

Latest version **0.2.0** (published 2019-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install unrar
pnpm add unrar
yarn add unrar
bun add unrar
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-10-02 |
| First published | 2014-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.21 |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Konstantin Burykin |
| Maintainers | burkostya |

## Links

- npm: https://www.npmjs.com/package/unrar
- Repository: https://github.com/burkostya/node-unrar
- Homepage: http://github.com/burkostya/node-unrar
- Issues: http://github.com/burkostya/node-unrar/issues
- npm.io page: https://npm.io/package/unrar

## Recent versions

- 0.2.0 (latest) — 2019-10-02
- 0.1.7 — 2017-01-09
- 0.1.6 — 2016-10-25
- 0.1.5 — 2016-03-30
- 0.1.4 — 2016-02-01
- 0.1.3 — 2015-05-15
- 0.1.2 — 2014-12-30
- 0.1.1 — 2014-12-24
- 0.1.0 — 2014-07-01

## README

# unrar

Unrars rar archives with `unrar` utility

## Installation

`npm install unrar`

You must have `unrar` tool in the path.
For windows download from http://www.rarlab.com/rar_add.htm

## Example

```js
var Unrar = require('unrar');

var archive = new Unrar('archive.rar');
// or
// var archive = new Unrar({
//   path:      protectedArchivePath,
//   arguments: ['-pPassword'],
//   bin: pathToUnrarBin // Default: unrar
// });

archive.list(function (err, entries) {
  var stream = archive.stream('some_binary_entry'); // name of entry
  stream.on('error', console.error);
  stream.pipe(require('fs').createWriteStream('some-binary-file'));
});
```

## Usage

```js
var Unrar = require('unrar');
```

## API

### Constructor

```js
var archive = new Unrar('/path/to/some/file.rar');
```

* `options` *String|Object* File path or options object
  - `path` *String* File path
  - `arguments` *Array* Additional arguments for `unrar` command

### archive.list(callback)

* `callback` *Function*
  - `error` Error
  - `entries` *Array* Descriptions of archive entries

### archive.stream(entryName)

* `entryName` *String* Name of entry for extracting

Returns readable stream

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