https://github.com/richienb/git-hash-object
Compute an object ID as if from `git hash-object`.
https://github.com/richienb/git-hash-object
Last synced: 6 months ago
JSON representation
Compute an object ID as if from `git hash-object`.
- Host: GitHub
- URL: https://github.com/richienb/git-hash-object
- Owner: Richienb
- License: mit
- Created: 2020-04-29T04:06:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-03T05:49:04.000Z (almost 5 years ago)
- Last Synced: 2025-04-13T09:46:17.243Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# git-hash-object [](https://travis-ci.com/Richienb/git-hash-object)
Compute an object ID as if from `git hash-object`.
[](https://npmjs.com/package/git-hash-object)
## Install
```sh
npm install git-hash-object
```
## Usage
```js
const gitHashObject = require("git-hash-object");
gitHashObject("Hello World");
//=> "5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689"
```
## API
### gitHashObject(input)
#### input
Type: `string | Buffer`
The input to compute.