{"_id":"git-packed-ref-parse","_rev":"372983","name":"git-packed-ref-parse","description":"streaming git packed-ref parser","dist-tags":{"latest":"0.0.0"},"maintainers":[{"name":"chrisdickinson","email":""}],"time":{"modified":"2021-07-27T06:08:19.000Z","created":"2013-03-20T02:54:31.725Z","0.0.0":"2013-03-20T02:54:31.725Z"},"users":{},"author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"repository":{"type":"git","url":"git://github.com/chrisdickinson/git-packed-ref-parse.git"},"versions":{"0.0.0":{"name":"git-packed-ref-parse","version":"0.0.0","description":"streaming git packed-ref parser","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git://github.com/chrisdickinson/git-packed-ref-parse.git"},"keywords":["git","packed-ref","parser","stream"],"author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","dependencies":{"line-stream":"0.0.0","through":"~2.2.7"},"devDependencies":{"tape":"~0.3.0"},"readmeFilename":"README.md","_id":"git-packed-ref-parse@0.0.0","dist":{"shasum":"b85046931f3e4a65679b5de54af3a5d3df372646","size":2167,"noattachment":false,"key":"/git-packed-ref-parse/-/git-packed-ref-parse-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-packed-ref-parse/download/git-packed-ref-parse-0.0.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"maintainers":[{"name":"chrisdickinson","email":""}],"directories":{},"publish_time":1363748071725,"_cnpm_publish_time":1363748071725,"_hasShrinkwrap":false}},"readme":"# git-packed-ref-parse\n\nparse packed-ref file streams into javascript objects.\n\n```javascript\n// after git gc in a git repo\nvar fs = require('fs')\n  , parse = require('git-packed-ref-parse')\n\nfs.createReadStream('.git/packed-refs')\n  .pipe(parse())\n  .on('data', console.log)\n\n``` \n\n## API\n\n#### parse() -> parse stream\n\ncreate a parse stream. when piped to, it will set\nthe encoding of the source stream to `utf8`.\n\n#### data event\n\nthe parse stream will emit data events for each\nref contained in the `packed-ref` file.\n\nthey take this form:\n\n```javascript\n{ \"hash\": \"40 character git hash\"\n, \"name\": \"ref name\"\n, \"commit\": null | \"40 character git hash\" }\n```\n\n`commit` will usually be `null`, except for annotated\n`tag` references.\n\n## License\n\nMIT\n","_attachments":{},"readmeFilename":"README.md","license":"MIT"}