Socket
Socket
Sign inDemoInstall

adbkit

Package Overview
Dependencies
10
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.8.0 to 2.8.1

19

lib/adb/linetransform.js

@@ -16,4 +16,4 @@ var LineTransform, Stream,

this.autoDetect = options.autoDetect || false;
this.checkedFirstByte = false;
this.transformNeeded = true;
this.skipBytes = 0;
delete options.autoDetect;

@@ -29,9 +29,20 @@ LineTransform.__super__.constructor.call(this, options);

LineTransform.prototype._transform = function(chunk, encoding, done) {
var hi, last, lo;
if (!this.checkedFirstByte) {
var hi, last, lo, skip;
if (this.autoDetect) {
if (chunk[0] === 0x0a) {
this.transformNeeded = false;
this.skipBytes = 1;
} else {
this.skipBytes = 2;
}
this.checkedFirstByte = true;
this.autoDetect = false;
}
if (this.skipBytes) {
skip = Math.min(chunk.length, this.skipBytes);
chunk = chunk.slice(skip);
this.skipBytes -= skip;
}
if (!chunk.length) {
return done();
}
if (!this.transformNeeded) {

@@ -38,0 +49,0 @@ return this._nullTransform(chunk, encoding, done);

{
"name": "adbkit",
"version": "2.8.0",
"version": "2.8.1",
"description": "A pure Node.js client for the Android Debug Bridge.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc