Created
March 5, 2014 20:15
-
-
Save meatballhat/9375679 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* jshint node: true */ | |
| 'use strict'; | |
| var csv = require('csv'); | |
| console.log('['); | |
| csv() | |
| .from.path(process.argv[2], { delimiter: ',', escape: '"' }) | |
| .on('record', function (row) { | |
| console.log(JSON.stringify(row) + ','); | |
| }) | |
| .on('end', function () { | |
| console.log('null]'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment