# hyperdrive-haus

> [![NPM](https://nodei.co/npm/hyperdrive-haus.png)](https://nodei.co/npm/hyperdrive-haus/)

Latest version **1.0.0** (published 2016-08-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install hyperdrive-haus
pnpm add hyperdrive-haus
yarn add hyperdrive-haus
bun add hyperdrive-haus
```

## 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.0.0 |
| Published | 2016-08-09 |
| First published | 2016-08-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | karissa |

## Links

- npm: https://www.npmjs.com/package/hyperdrive-haus
- Repository: https://github.com/karissa/hyperdrive-haus
- Homepage: https://github.com/karissa/hyperdrive-haus#readme
- Issues: https://github.com/karissa/hyperdrive-haus/issues
- npm.io page: https://npm.io/package/hyperdrive-haus

## Dependencies (3)

- [pump](https://npm.io/package/pump.md) ^1.0.1
- [ndjson](https://npm.io/package/ndjson.md) ^1.4.3
- [hyperquest](https://npm.io/package/hyperquest.md) ^2.0.0

## Recent versions

- 1.0.0 (latest) — 2016-08-09

## README

# hyperdrive-haus

A hyperdrive javascript API for dat.haus

[![NPM](https://nodei.co/npm/hyperdrive-haus.png)](https://nodei.co/npm/hyperdrive-haus/)

```js
var haus = require('hyperdrive-haus')
var archive = haus('archive-key-here')

archive.list(function (err, files) {
  console.log(files) // list of files
})

```

## API

### `var archive = haus(archive, opts)`

`archive`: a hyperdrive archive **or** a hex encoded hyperdrive string.
`opts`:
  - `url`: the URL for dat.haus, defaults to `http://dat.haus`

### `archive.createFileReadStream(entry)`

Creates a read stream of the file with a given file name

Example:

```js
var readStream = archive.createFileReadStream('hello.txt')
readStream.pipe(process.stdout)
```

### `archive.list(callback)`

List the files in the archive. Takes an optional callback. Will return a stream if callback not supplied.

```js
var stream = archive.list()
stream.on('data', function (entry) {
  console.log(entry)
})
```

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