# hash-of-stream

> Given a readable stream, calls a callback with the hash of the data

Latest version **1.0.0** (published 2016-10-17) · MIT license · 0 weekly downloads

## Install

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

## 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-10-17 |
| First published | 2016-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Thomas Watson Steen |
| Maintainers | watson |
| Keywords | hash, stream |

## Links

- npm: https://www.npmjs.com/package/hash-of-stream
- Repository: https://github.com/watson/hash-of-stream
- Homepage: https://github.com/watson/hash-of-stream#readme
- Issues: https://github.com/watson/hash-of-stream/issues
- npm.io page: https://npm.io/package/hash-of-stream

## 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.0 (latest) — 2016-10-17

## README

# hash-of-stream

Given a readable stream, calls a callback with the hash of the data.

[![Build status](https://travis-ci.org/watson/hash-of-stream.svg?branch=master)](https://travis-ci.org/watson/hash-of-stream)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

## Usage

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

var file = fs.createReadStream(__filename)

hasher(file, function (hash) {
  console.log('The hash of %s is %s', __filename, hash)
})
```

## API

```js
hasher(stream, [algorithm], callback)
```

- `stream` must be a readable stream
- `algorithm` is optional and will default to `sha256`
- `callback` will be called with the hash of the data in the given
  stream once the stream ends

## License

MIT

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