New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

glob-hasher

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-hasher

A simple glob hasher for Node.js, uses Rust for faster globbing and hashing

  • 1.4.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8.9K
decreased by-20.04%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 04 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc