Skip to content

kodie/md5-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md5-file Build Status js-standard-style

Simply return an md5 sum of a given file. If using async version (by including callback), it will stream; successfully tested on files 4 GB+.

Installation

$ npm install md5-file

Test:

$ npm test

API

md5File(path, [callback])

var md5File = require('md5-file')

// sync (no callback)

md5File('./path/to/a_file') // '18e904aae79b5642ed7975c0a0074936'

// async/streamed (if using callback)

md5File('./path/to/a_file', function (error, sum) {
  if (error) return console.log(error)
  console.log(sum) // '18e904aae79b5642ed7975c0a0074936'
})

License

MIT