Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (23 sloc) 0.656 kb

SYNOPSIS

recursively hash all the files in a specified path. Ensure hashing happens in a predictable order. Appreciate .ignore glob files & patterns.

USAGE

Uses sha1 by default; use openssl list-message-digest-algorithms for a list of supported algorithms.

lib

var hashd = require('hashd')

var hash = hashd('./path', {
  algorithm: 'md5',
  files: ['.gitignore', '.npmignore'],
  patterns: ['*.txt']
})

console.log(hash)

cli

npm install hashd -g
hashd ./path --algorithm sha1 --files '.gitignore .npmignore' --patterns '*.gz'

OPTIONS

CLI options and api options are the same. First argument is a path.

Jump to Line
Something went wrong with that request. Please try again.