/git-hash-object

Compute an object ID as if from `git hash-object`.

Primary LanguageJavaScriptMIT LicenseMIT

git-hash-object Travis CI Build Status

Compute an object ID as if from git hash-object.

NPM Badge

Install

npm install git-hash-object

Usage

const gitHashObject = require("git-hash-object");

gitHashObject("Hello World");
//=> "5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689"

API

gitHashObject(input)

input

Type: string | Buffer

The input to compute.