# md5-file-graceful

> return an md5sum of a given file opened with graceful-fs

Latest version **1.0.1** (published 2019-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install md5-file-graceful
pnpm add md5-file-graceful
yarn add md5-file-graceful
bun add md5-file-graceful
```

Provides the command `md5-file-graceful`.

## 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 | 2019-11-01 |
| First published | 2019-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0 |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | daixianceng |
| Keywords | md5, md5sum, checksum |

## Links

- npm: https://www.npmjs.com/package/md5-file-graceful
- Repository: https://github.com/daixianceng/md5-file-graceful
- Homepage: https://github.com/daixianceng/md5-file-graceful#readme
- Issues: https://github.com/daixianceng/md5-file-graceful/issues
- npm.io page: https://npm.io/package/md5-file-graceful

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-11-01
- 1.0.0 — 2019-11-01

## README

# md5-file-graceful

Get the MD5-sum of a given file, with low memory usage, even on huge files.

Open file with [graceful-fs](https://github.com/isaacs/node-graceful-fs)

## Installation

```sh
npm install --save md5-file-graceful
```

## Usage

### As a module
```js
const md5File = require('md5-file-graceful')

/* Async usage */
md5File('LICENSE.md', (err, hash) => {
  if (err) throw err

  console.log(`The MD5 sum of LICENSE.md is: ${hash}`)
})

/* Sync usage */
const hash = md5File.sync('LICENSE.md')
console.log(`The MD5 sum of LICENSE.md is: ${hash}`)
```

### As a command line tool
```
$ md5-file-graceful LICENSE.md
```

## Promise support

If you require `md5-file-graceful/promise` you'll receive an alternative API where all
functions that takes callbacks are replaced by `Promise`-returning functions.

```js
const md5File = require('md5-file-graceful/promise')

md5File('LICENSE.md').then(hash => {
  console.log(`The MD5 sum of LICENSE.md is: ${hash}`)
})
```

## API

### `md5File(filepath: string, cb: function)`

Asynchronously get the MD5-sum of the file at `filepath`.

The callback `cb` will be called with `(err: Error, hash: string)`.

### `md5File.sync(filepath: string) => string`

Synchronously get the MD5-sum of the file at `filepath`.

### License

MIT

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