Skip to content

Commit 40af1f1

Browse files
authored
Update readme.md
1 parent 6e6f0e7 commit 40af1f1

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

readme.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,18 @@ csv({output:"line"})
141141
})
142142
```
143143

144+
### Use Stream
144145

146+
```js
147+
const csv=require('csvtojson');
148+
149+
const readStream=require('fs').createReadStream(csvFilePath);
150+
151+
const writeStream=request.put('http://mysite.com/obj.json');
152+
153+
readStream.pipe(csv()).pipe(writeStream);
154+
155+
```
145156

146157
To find more detailed usage, please see [API](#api) section
147158

0 commit comments

Comments
 (0)