# md5-file

> Get the MD5-sum of a given file, with low memory usage, even on huge files.

Latest version **5.0.0** (published 2020-04-05) · MIT license · 0 weekly downloads

## Install

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

Provides the command `md5-file`.

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2020-04-05 |
| First published | 2014-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/md5-file) |
| Module format | CommonJS |
| Node | >=10.13.0 |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 214 |
| Maintainers | linusu, roryrjb |
| Keywords | md5, md5sum, checksum |

## Links

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

## 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

- 5.0.0 (latest) — 2020-04-05
- 4.0.0 — 2018-04-04
- 3.2.3 — 2017-09-22
- 3.2.2 — 2017-08-15
- 3.2.1 — 2017-08-15
- 3.2.0 — 2017-08-14
- 3.1.1 — 2016-06-20
- 3.1.0 — 2016-05-22
- 3.0.1 — 2016-05-22
- 2.0.7 — 2016-05-22
- 3.0.0 — 2016-05-22
- 2.0.6 — 2016-05-21
- 2.0.5 — 2016-05-21
- 2.0.4 — 2015-11-27
- 2.0.3 — 2015-06-20
- … 14 more at https://npm.io/package/md5-file/versions

## README

# MD5 file

Get the MD5-sum of a given file, with low memory usage, even on huge files.

## Installation

```sh
npm install --save md5-file
```

## Usage

### As a module

```js
const md5File = require('md5-file')

/* Async usage */
md5File('LICENSE.md').then((hash) => {
  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

```sh
$ md5-file LICENSE.md
ad1faf9381e43c471dc381c17a4ee4b6
```

## API

### `md5File(path: string) => Promise<string>`

Asynchronously get the MD5-sum of the file at `path`.

Returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that will be resolved with a string containing the MD5-sum.

### `md5File.sync(path: string) => string`

Synchronously get the MD5-sum of the file at `path`.

### License

MIT

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