
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
hashdirectory
Advanced tools
Create an sha1 hash sum from a directory of files using the git algorithm
Create an sha1 hash sum from a directory of files using the git algorithm.
Creating a hash for an entire directory, instead of for a single file, can be useful for cache busting. Using git's method of creating the hash just builds upon something consistent that is known to work.
This package does not requires git to be installed on the production server, however. It only reproduces the git algorithm for hashing files and folders (but not commits or tags).
npm install --save hashdirectory
var hashdirectory = require('hashdirectory');
// Synchronous, for before your webserver starts up.
var hashed = hashdirectory.sync('./public');
// Asynchronous, for everything else.
hashdirectory('./public', function(err, hashed) {
});
// Or, if promises are more your thing.
var hashedPromise = hashdirectory('./public');
FAQs
Create an sha1 hash sum from a directory of files using the git algorithm
We found that hashdirectory demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.