# git-object-commit

> parse and create git commit objects

Latest version **1.0.0** (published 2014-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-object-commit
pnpm add git-object-commit
yarn add git-object-commit
bun add git-object-commit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-08-18 |
| First published | 2013-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Chris Dickinson |
| Maintainers | chrisdickinson |
| Keywords | git, commit, object |

## Links

- npm: https://www.npmjs.com/package/git-object-commit
- Repository: https://github.com/chrisdickinson/git-object-commit
- Issues: https://github.com/chrisdickinson/git-object-commit/issues
- npm.io page: https://npm.io/package/git-object-commit

## Dependencies (1)

- [bops](https://npm.io/package/bops.md) ~0.0.6

## Recent versions

- 1.0.0 (latest) — 2014-08-18
- 0.0.7 — 2014-06-09
- 0.0.6 — 2013-05-27
- 0.0.5 — 2013-05-06
- 0.0.4 — 2013-05-04
- 0.0.3 — 2013-04-04
- 0.0.2 — 2013-03-18
- 0.0.1 — 2013-03-18

## README

# git-object-commit

git commit objects as javascript objects.

commit objects are immutable once created.

```javascript
var Buffer = require('buffer').Buffer
  , commit = require('git-object-commit')

var b = commit.create(new Buffer(...))

b = commit.read(<some git buffer>)

```

## API

#### commit.read(<git buffer>) -> Commit

read a commit from some git buffer data.

#### commit.create(author, tree, message, parent[, committer][, attrs]) -> Commit

create a commit from some source data.

all fields (save for message) may be arrays.

#### Commit methods

* author() -> string | undefined
* authors() -> [string, ...] | []
* committer() -> string | undefined
* committers() -> [string, ...] | []
* parent() -> string | undefined
* parents() -> [string, ...] | []
* tree() -> string | undefined
* trees() -> [string, ...] | []
* message() -> string
* attr(attribute) -> [string, ...] | []

## License

MIT

---
_Source: https://npm.io/package/git-object-commit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
