Comparing version 0.0.1 to 0.0.2
13
index.js
@@ -7,8 +7,2 @@ module.exports = function (stream, options, callback) { | ||
stream.on('data', onData) | ||
stream.once('end', onEnd) | ||
stream.once('error', callback) | ||
stream.once('error', cleanup) | ||
stream.once('close', cleanup) | ||
var limit = typeof options.limit === 'number' | ||
@@ -28,2 +22,3 @@ ? options.limit | ||
callback(err) | ||
stream.resume() // dump stream | ||
cleanup() | ||
@@ -36,2 +31,8 @@ return | ||
stream.on('data', onData) | ||
stream.once('end', onEnd) | ||
stream.once('error', callback) | ||
stream.once('error', cleanup) | ||
stream.once('close', cleanup) | ||
function onData(chunk) { | ||
@@ -38,0 +39,0 @@ buffers.push(chunk) |
{ | ||
"name": "raw-body", | ||
"description": "Get and validate the raw body of a readable stream.", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Jonathan Ong", |
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
4818
60