@transformation/stream
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "@transformation/stream", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Transformations for working with Node streams", | ||
@@ -32,3 +32,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "f1ddfce90ef976216c037e445510a52040742e19" | ||
"gitHead": "25baa2e2b309544e06c9534ed2c72730f86de460" | ||
} |
@@ -7,2 +7,3 @@ # @transformation/stream | ||
- [concat](#concat) | ||
- [fromStream](#fromstream) | ||
@@ -15,2 +16,14 @@ - [lines](#lines) | ||
## concat | ||
Concatenates all of output of a stream into a string. | ||
```js | ||
await expect( | ||
pipeline(fromStream(fs.createReadStream(testFile)), concat()), | ||
"to yield items", | ||
[fs.readFileSync(testFile, "utf8")] | ||
); | ||
``` | ||
## fromStream | ||
@@ -17,0 +30,0 @@ |
const Chunk = require("./Chunk"); | ||
const concat = require("./concat"); | ||
const fromStream = require("./fromStream"); | ||
@@ -9,2 +10,3 @@ const lines = require("./lines"); | ||
Chunk, | ||
concat, | ||
fromStream, | ||
@@ -11,0 +13,0 @@ lines, |
1354940
24
538
206
5