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

@nice-labs/git-rev

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nice-labs/git-rev

Synchronously get the current git commit hash, tag, or branch

  • 3.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@nice-labs/git-rev

node version npm module

Synchronously get the current git commit hash, tag, count, branch or commit message.

Forked from git-rev-sync-js.

usage

import git from '@nice-labs/git-rev';

// short commit-hash
console.log(git.commitHash(true)); // 75bf4ee

// long commit-hash
console.log(git.commitHash()); // 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef

// branch name
console.log(git.branchName()); // master

installation

npm install --save-dev @nice-labs/git-rev

FAQs

Package last updated on 17 Sep 2022

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