Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-read-pkt-line

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-read-pkt-line

read git packet lines (for smart protocol)

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by11.41%
Maintainers
1
Weekly downloads
 
Created
Source

git-read-pkt-line

Read git smart protocol packet lines.

var recv = require('git-write-pkt-line')()

recv.on('data', function(d) {
  console.log(d)
})

send.write('0032want 0000000000000000000000000000000000000000\n')

API

this module presents a through stream; when written to it removes the length header; but it leaves the newline ending. if an empty string or buffer is written, it will emit a git "flush packet", which is just a size-0 packet.

after each line received, it checks to see if the next line starts with PACK; and if so will enter recv-pack mode.

data event

{ type: 'packfile' | 'pkt-line' | 'pkt-flush' | 'progress' | 'error'
, data: null | Buffer()
, caps: ['list', 'of', 'capabilities'] }

Warning

This module simply passes pack data through. If the source is set to emit side-band or side-band-64k type data, you'll have to use another module to separate that multiplexed data out.

License

MIT

Keywords

FAQs

Package last updated on 22 May 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc