m3u8stream
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -28,17 +28,18 @@ const Writable = require('stream').Writable; | ||
decodeStrings: false, | ||
write: function(chunk, encoding, callback) { | ||
var lines = chunk.toString('utf8').split('\n'); | ||
if (lastLine) { lines[0] = lastLine + lines[0]; } | ||
lines.forEach(function(line, i) { | ||
if (i < lines.length - 1) { | ||
parseLine(line); | ||
} else { | ||
// Save the last line in case it has been broken up. | ||
lastLine = line; | ||
} | ||
}); | ||
callback(); | ||
}, | ||
}), | ||
this._write = function(chunk, encoding, callback) { | ||
var lines = chunk.toString('utf8').split('\n'); | ||
if (lastLine) { lines[0] = lastLine + lines[0]; } | ||
lines.forEach(function(line, i) { | ||
if (i < lines.length - 1) { | ||
parseLine(line); | ||
} else { | ||
// Save the last line in case it has been broken up. | ||
lastLine = line; | ||
} | ||
}); | ||
callback(); | ||
}; | ||
this.on('finish', function() { | ||
@@ -45,0 +46,0 @@ parseLine(lastLine); |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9170