1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const stream_1 = require("stream");
|
4 | class ReadableString extends stream_1.Readable {
|
5 | constructor(str) {
|
6 | super();
|
7 | this.str = str;
|
8 | this.sent = false;
|
9 | }
|
10 | _read() {
|
11 | if (!this.sent) {
|
12 | this.push(Buffer.from(this.str));
|
13 | this.sent = true;
|
14 | }
|
15 | else {
|
16 | this.push(null);
|
17 | }
|
18 | }
|
19 | }
|
20 | exports.default = ReadableString;
|