1. md5-file
Get the MD5-sum of a given file, with low memory usage, even on huge files.
md5-file
Package: md5-file
Created by: roryrjb
Last modified: Sun, 19 Jun 2022 17:15:17 GMT
Version: 5.0.0
License: MIT
Downloads: 5,399,066
Repository: https://github.com/roryrjb/md5-file

Install

npm install md5-file
yarn add md5-file

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code