DefaultOptions implemented as module factory

This commit is contained in:
Lewis Diamond
2019-12-02 16:02:40 -05:00
parent c690185ab7
commit a85054fd82
40 changed files with 357 additions and 316 deletions

View File

@@ -5,9 +5,7 @@ export function reduce<T, R>(
| ((previousValue: R, chunk: T, encoding: string) => R)
| ((previousValue: R, chunk: T, encoding: string) => Promise<R>),
initialValue: R,
options: TransformOptions = {
objectMode: true,
},
options?: TransformOptions,
) {
let value = initialValue;
return new Transform({