Socket
Book a DemoInstallSign in
Socket

git-packidx-parser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-packidx-parser

git pack index file parser

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

git-packidx-parser

given a packfile, create a stream to parse it's index file.

currently only supports v2 idx files.

Build Status browser support


var packidx = require('git-packidx-parser')

fs.createReadStream('path/to/packidx')
  .pipe(packidx(<packfile>))
  .on('data', function(packidx) {

  })

api

packidx() -> packidx stream

return a writable stream that emits a single 'data' event containing a PackIDX instance.

PackIDX#find(Buffer objectID) -> {offset object} | null

attempt to find objectID in this index file. returns either an offset object, or null if the objectID isn't present in this pack index.

if an offset object is returned, it'll look like so:

{ offset: number | {hi: number, lo: number}
, next: number | {hi: number, lo: number} | null }

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