md5-file
    TypeScript icon, indicating that this package has built-in type declarations

    5.0.0 • Public • Published

    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

    Install

    npm i md5-file

    DownloadsWeekly Downloads

    1,274,469

    Version

    5.0.0

    License

    MIT

    Unpacked Size

    3.92 kB

    Total Files

    6

    Last publish

    Collaborators

    • linusu
    • roryrjb