# git-to-js

> translate git raw objects into javascript objects

Latest version **2.0.0** (published 2016-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-to-js
pnpm add git-to-js
yarn add git-to-js
bun add git-to-js
```

## 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 | 2.0.0 |
| Published | 2016-06-18 |
| First published | 2013-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Chris Dickinson |
| Maintainers | chrisdickinson |
| Keywords | git, raw, object, conversion |

## Links

- npm: https://www.npmjs.com/package/git-to-js
- Repository: https://github.com/chrisdickinson/git-to-js
- Homepage: https://github.com/chrisdickinson/git-to-js#readme
- Issues: https://github.com/chrisdickinson/git-to-js/issues
- npm.io page: https://npm.io/package/git-to-js

## Dependencies (4)

- [git-object-tag](https://npm.io/package/git-object-tag.md) ^1.0.0
- [git-object-blob](https://npm.io/package/git-object-blob.md) ^1.0.0
- [git-object-tree](https://npm.io/package/git-object-tree.md) ^1.0.0
- [git-object-commit](https://npm.io/package/git-object-commit.md) ^1.0.0

## Recent versions

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

## README

# git-to-js

given a numerical git object type and a buffer,
produce a (humane!) javascript object.

```javascript

var toJS = require('git-to-js')

toJS(1, new Buffer(...)) -> Commit object
toJS(2, new Buffer(...)) -> Tree object
toJS(3, new Buffer(...)) -> Blob object
toJS(4, new Buffer(...)) -> Tag object

```

## API

#### toJS(type number, buffer) -> Commit | Tree | Blob | Tag

given type and buffer, produce a JS object.

#### toJS.blob(...) -> Blob

blob constructor. see [git-object-blob](http://npm.im/git-object-blob).

#### toJS.commit(...) -> Commit

commit constructor. see [git-object-commit](http://npm.im/git-object-commit).

#### toJS.tree(...) -> Tree

tree constructor. see [git-object-tree](http://npm.im/git-object-tree).

#### toJS.tag(...) -> Tag

tag constructor. see [git-object-tag](http://npm.im/git-object-tag).

## License

MIT

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