ObjectMode is now true by default
This commit is contained in:
parent
74ce415118
commit
e6fb55eb1a
@ -28,7 +28,7 @@ import { unbatch } from "./unbatch";
|
||||
import { compose } from "./compose";
|
||||
import { demux } from "./demux";
|
||||
|
||||
export function strom(defaultOptions?: TransformOptions) {
|
||||
export function strom(defaultOptions: TransformOptions = { objectMode: true }) {
|
||||
function withDefaultOptions<T extends any[], R>(
|
||||
n: number,
|
||||
fn: (...args: T) => R,
|
||||
|
@ -59,7 +59,7 @@ test.cb(
|
||||
const source = new Readable({ objectMode: false });
|
||||
|
||||
source
|
||||
.pipe(collect())
|
||||
.pipe(collect({ objectMode: false }))
|
||||
.on("data", collected => {
|
||||
expect(collected).to.deep.equal(Buffer.from("abc"));
|
||||
t.pass();
|
||||
|
@ -172,7 +172,7 @@ test.cb(
|
||||
test.cb("concat() concatenates empty list of readable streams", t => {
|
||||
t.plan(0);
|
||||
concat()
|
||||
.pipe(collect())
|
||||
.pipe(collect({ objectMode: false }))
|
||||
.on("data", _ => {
|
||||
t.fail();
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user