1 | function TXTConcat(data, feed) {
|
2 | if (this.buffer === undefined) {
|
3 | this.buffer = '';
|
4 | }
|
5 | if (this.isLast()) {
|
6 | feed.send(this.buffer);
|
7 | feed.close();
|
8 | } else {
|
9 | this.buffer = this.buffer.concat(data);
|
10 | feed.end();
|
11 | }
|
12 | }
|
13 |
|
14 | /**
|
15 | * Take `String` and concat all items in just one string
|
16 | *
|
17 | * @name TXTConcat
|
18 | * @alias concat
|
19 | * @param {undefined} none
|
20 | * @returns {String}
|
21 | */
|
22 | export default {
|
23 | TXTConcat,
|
24 | };
|