Compare commits

...

2 Commits

@ -3,6 +3,7 @@
const Promise = require("bluebird");
const propagateAbort = require("@promistream/propagate-abort");
const unreachable = require("@joepie91/unreachable")("@promistream/buffer");
const util = require("util");
module.exports = function bufferStream() {
let buffer;
@ -20,7 +21,11 @@ module.exports = function bufferStream() {
return attemptRead(readFunc);
}
} else {
throw new Error("Buffered stream produced a non-array value");
// FIXME: Make this its own module, and improve its compactness?
let stringified = util.inspect(result, { depth: 0 })
.replace(/\s+/g, " ");
throw new Error(`Buffered stream produced a non-array value: ${stringified}`);
}
});
}

@ -1,6 +1,6 @@
{
"name": "@promistream/buffer",
"version": "0.1.1",
"version": "0.1.2",
"main": "index.js",
"repository": "http://git.cryto.net/promistream/buffer.git",
"author": "Sven Slootweg <admin@cryto.net>",

Loading…
Cancel
Save