md5-file

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

MIT 29 个版本
安装
npm install md5-file
yarn add md5-file
pnpm add md5-file
bun add md5-file
README

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

版本列表
5.0.0 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
3.0.0 2016-05-22
2.0.7 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
2.0.2 2015-06-20
2.0.1 2015-06-20
2.0.0 2015-05-13
1.1.10 2014-12-06
1.1.9 2014-12-06
1.1.8 2014-12-06
1.1.7 2014-12-06
1.1.5 2014-11-26
1.1.4 2014-10-31
1.1.3 2014-10-31
1.1.2 2014-09-03
1.1.1 2014-06-07
1.1.0 2014-06-07
1.0.1 2014-04-25