glob-hasher
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

glob-hasher

A library that will glob for files and return the xxhash in u64 / BigInt as a JS library. It takes advantage of napi-rs to interop with the libraries doing the heavy lifting of both globbing and hashing. xxhash-rust, ignore crates are used here.

API

import { hashGlob, hashGlobParallel } from "glob-hasher";

// Glob and hash with 16 threads
hashGlobParallel(["**/*.ts", "!**/node_modules/**"], {
  cwd: "some/path",
  concurrency: 16
});

// Glob and hash only with one core, using .gitignore to filter the glob
hashGlob(["**/*.ts"], {
  cwd: "some/path",
  gitignore: true
});

Releasing

Be sure to use npm version to create a new git tag.

Readme

Keywords

none

Package Sidebar

Install

npm i glob-hasher

Weekly Downloads

7,431

Version

1.3.0

License

MIT

Unpacked Size

25.2 kB

Total Files

19

Last publish

Collaborators

  • kenotron_msft