Socket
Socket
Sign inDemoInstall

hash-for-dep

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-for-dep

generates a hash that represents a module and its depenencies uniqueness


Version published
Maintainers
2
Created

What is hash-for-dep?

The hash-for-dep npm package is used to generate a hash for a given dependency in a Node.js project. This can be useful for caching, ensuring consistency, and detecting changes in dependencies.

What are hash-for-dep's main functionalities?

Generate Hash for a Dependency

This feature allows you to generate a hash for a specific dependency, such as 'express'. The hash can be used to detect changes or for caching purposes.

const hashForDep = require('hash-for-dep');
const hash = hashForDep('express');
console.log(hash);

Generate Hash for a Dependency with a Specific Version

This feature allows you to generate a hash for a specific version of a dependency. This can be useful for ensuring consistency across different environments.

const hashForDep = require('hash-for-dep');
const hash = hashForDep('express', '4.17.1');
console.log(hash);

Generate Hash for a Dependency with Options

This feature allows you to generate a hash for a dependency with additional options, such as specifying the base directory of the project. This can be useful for more complex project structures.

const hashForDep = require('hash-for-dep');
const options = { basedir: '/path/to/project' };
const hash = hashForDep('express', options);
console.log(hash);

Other packages similar to hash-for-dep

FAQs

Package last updated on 13 Apr 2015

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