git-object-tag

parse and create git tag objects

npm install git-object-tag
6 downloads in the last week
29 downloads in the last month

git-object-tag

git tag objects as javascript objects.

tag objects are immutable once created.

var Buffer = require('buffer').Buffer
  , tag = require('git-object-tag')

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

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

API

tag.read() -> Tag

read a tag from some git buffer data.

tag.create(tagger, object, type, tag, message, attrs) -> Tag

create a tag from some source data.

all fields (save for message) may be arrays.

Tag#tag() -> string

Tag#type() -> "commit" | "tag" | "blob" | "tree"

Tag#tagger() -> string

Tag#message() -> string

Tag#attr(attr) -> string | undefined

License

MIT

npm loves you