Skip to content

Commit

Permalink
chore: add comment about throwing if uncopieable readableStream is al…
Browse files Browse the repository at this point in the history
…ready flowing
  • Loading branch information
trivikr committed Feb 21, 2022
1 parent 568eb4b commit e166117
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/hash-stream-node/src/readableStreamHasher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { HashCalculator } from "./HashCalculator";
import { isFileStream } from "./isFileStream";

export const readableStreamHasher: StreamHasher<Readable> = (hashCtor: HashConstructor, readableStream: Readable) => {
// ToDo: throw if readableStream is already flowing and it's copy can't be created.
// ToDo: create accurate copy if filestream is created from file descriptor.
const streamToPipe = isFileStream(readableStream)
? createReadStream(readableStream.path, {
Expand Down

0 comments on commit e166117

Please sign in to comment.