1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.transformNoOp = void 0;
|
4 | const stream_1 = require("stream");
|
5 | /**
|
6 | * Transform that does nothing (pass the data through).
|
7 | * Can be used e.g to convert "not-valid" stream (e.g one that `transformMap` is producing)
|
8 | * into a "valid" stream (that implements async-iteration interface).
|
9 | */
|
10 | function transformNoOp() {
|
11 | return new stream_1.Transform({
|
12 | objectMode: true,
|
13 | transform(chunk, _, cb) {
|
14 | cb(null, chunk);
|
15 | },
|
16 | });
|
17 | }
|
18 | exports.transformNoOp = transformNoOp;
|