# hashdir

> Hashes content in directory and returning object with file structure and hashes (useful in tests)

Latest version **0.0.1** (published 2014-01-17) · MIT license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2014-01-17 |
| First published | 2014-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vsevolod Strukchinsky |
| Maintainers | floatdrop |
| Keywords | recursive, hash, directory, folder, dir |

## Links

- npm: https://www.npmjs.com/package/hashdir
- Repository: https://github.com/floatdrop/hashdir
- Issues: https://github.com/floatdrop/hashdir/issues
- npm.io page: https://npm.io/package/hashdir

## Dependencies (1)

- [walk](https://npm.io/package/walk.md) ~2.2.1

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-01-17

## README

# hashdir
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status](https://coveralls.io/repos/floatdrop/hashdir/badge.png)](https://coveralls.io/r/floatdrop/hashdir) [![Dependency Status][depstat-image]][depstat-url]

Hashes content in directory and returning object with file structure and hashes (useful in tests)

## Install

Install with npm:

`npm install --save hashdir`

## Example

```js
var hashdir = require('hashdir');

/* `directory` structure:
directory/
  folder/
    file2.js
  emptyfolder/
  file1.js
*/
hashdir('directory', function (err, result) {
    assert.deepEqual(result, {
        'file1.js': 'SHA-1 of file1.js content',
        'folder/file2.js': 'SHA-1 of file2.js content',
        'folder/emptyfolder': undefined,
        'folder/folder': undefined,
    });
});

```

## API

### hashdir(path[, opts], cb)

__path__: path to directory, that you want to be hashed.

__Options__: Object, that passed to [`walk`](https://npmjs.org/package/walk) module.

__Callback__: function, that recieves `error` as first argument and `result` object in second.

## License

MIT © Vsevolod Strukchinsky

[npm-url]: https://npmjs.org/package/hashdir
[npm-image]: https://badge.fury.io/js/hashdir.png

[travis-url]: http://travis-ci.org/floatdrop/hashdir
[travis-image]: https://travis-ci.org/floatdrop/hashdir.png?branch=master

[depstat-url]: https://david-dm.org/floatdrop/hashdir
[depstat-image]: https://david-dm.org/floatdrop/hashdir.png?theme=shields.io

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