Skip to content

Commit 2007658

Browse files
authored
Merge pull request #142 from bertyhell/patch-1
Added csv url example
2 parents 590d558 + b5649c4 commit 2007658

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,23 @@ csv()
111111

112112
```
113113

114+
### From CSV Url
115+
116+
```js
117+
const request=require('request')
118+
const csv=require('csvtojson')
119+
120+
csv()
121+
.fromStream(request.get('http://mywebsite.com/mycsvfile.csv'))
122+
.on('csv',(csvRow)=>{
123+
// csvRow is an array
124+
})
125+
.on('done',(error)=>{
126+
127+
})
128+
129+
```
130+
114131
### Convert to CSV row arrays with csv header row
115132

116133
```js

0 commit comments

Comments
 (0)