md5-file
Get the MD5-sum of a given file, with low memory usage, even on huge files.
Last updated 7 years ago by linusu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install md5-file 
SYNC missed versions from official npm registry.

MD5 file

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

Installation

npm install --save md5-file

Usage

As a module

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

$ md5-file LICENSE.md
ad1faf9381e43c471dc381c17a4ee4b6

API

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

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

Returns a 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

Current Tags

  • 5.0.0                                ...           latest (7 years ago)

29 Versions

  • 5.0.0                                ...           7 years ago
  • 4.0.0                                ...           9 years ago
  • 3.2.3                                ...           9 years ago
  • 3.2.2                                ...           9 years ago
  • 3.2.1                                ...           9 years ago
  • 3.2.0                                ...           9 years ago
  • 3.1.1                                ...           10 years ago
  • 3.1.0                                ...           11 years ago
  • 3.0.1                                ...           11 years ago
  • 2.0.7                                ...           11 years ago
  • 3.0.0                                ...           11 years ago
  • 2.0.6                                ...           11 years ago
  • 2.0.5                                ...           11 years ago
  • 2.0.4                                ...           11 years ago
  • 2.0.3                                ...           11 years ago
  • 2.0.2                                ...           11 years ago
  • 2.0.1                                ...           11 years ago
  • 2.0.0                                ...           12 years ago
  • 1.1.10                                ...           12 years ago
  • 1.1.9                                ...           12 years ago
  • 1.1.8                                ...           12 years ago
  • 1.1.7                                ...           12 years ago
  • 1.1.5                                ...           12 years ago
  • 1.1.4                                ...           12 years ago
  • 1.1.3                                ...           12 years ago
  • 1.1.2                                ...           12 years ago
  • 1.1.1                                ...           12 years ago
  • 1.1.0                                ...           12 years ago
  • 1.0.1                                ...           13 years ago
Maintainers (2)
Downloads
Total 163
Today 0
This Week 9
This Month 64
Last Day 1
Last Week 17
Last Month 46
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE