# hash-stream-promise

> Hash the content from a readable stream into a fingerprint hash

Latest version **1.0.1** (published 2018-02-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install hash-stream-promise
pnpm add hash-stream-promise
yarn add hash-stream-promise
bun add hash-stream-promise
```

## 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.1 |
| Published | 2018-02-04 |
| First published | 2018-02-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | walter buczacka |
| Maintainers | wal |
| Keywords | hash, stream |

## Links

- npm: https://www.npmjs.com/package/hash-stream-promise
- npm.io page: https://npm.io/package/hash-stream-promise

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-02-04
- 1.0.0 — 2018-02-03

## README

# hash-stream

This module takes content of a readable stream
and creates a fingerprint hash for it.

```
npm install hash-stream-promise
```

## Usage

``` js
var hasher = require('hash-stream-promise')
var fs = require('fs')

var stream = fs.createReadStream('file')

hasher(stream)
  .then(hash => {
    console.log('this is the hash', hash)
  })
  .catch(err => {
    console.log('handle error', err)
  })
```

## API
#### `hasher(stream, [algorithm])`
Default algorithm is 'sha256', you can use any other valid one like sha512, etc.
The function returns a Promise object that is resolved with the file hash.

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