Comparing version 1.2.0 to 1.3.0
@@ -29,3 +29,3 @@ | ||
if (err) reject(err); | ||
else resolve(Buffer.concat(bufs)); | ||
else resolve(s._readableState && s._readableState.objectMode ? bufs : Buffer.concat(bufs)); | ||
} | ||
@@ -32,0 +32,0 @@ |
{ | ||
"name": "as-buffer", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "stream or anything to buffer as a Promise", | ||
@@ -10,3 +10,4 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "node test/" | ||
"test": "nyc node test", | ||
"coverage": "nyc report --reporter=lcov > coverage.lcov && codecov" | ||
}, | ||
@@ -22,3 +23,7 @@ "repository": "git+https://github.com/caub/as-buffer.git", | ||
"bugs": "https://github.com/caub/as-buffer/issues", | ||
"homepage": "https://github.com/caub/as-buffer#readme" | ||
"homepage": "https://github.com/caub/as-buffer#readme", | ||
"devDependencies": { | ||
"codecov": "^3.0.0", | ||
"nyc": "^11.3.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
## Read stream as buffer | ||
## Read stream as buffer\* | ||
[![npm version][npm-image]][npm-url] | ||
@@ -16,2 +16,3 @@ [![build status][travis-image]][travis-url] | ||
``` | ||
\*: exception of object-mode streams that are returned as array | ||
@@ -18,0 +19,0 @@ like https://github.com/stream-utils/stream-to-array but simpler |
3339
25
2