Socket
Book a DemoInstallSign in
Socket

git-to-js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-to-js

translate git raw objects into javascript objects

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

git-to-js

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


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.

toJS.commit(...) -> Commit

commit constructor. see git-object-commit.

toJS.tree(...) -> Tree

tree constructor. see git-object-tree.

toJS.tag(...) -> Tag

tag constructor. see git-object-tag.

License

MIT

Keywords

git

FAQs

Package last updated on 18 Jun 2016

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