Created
July 29, 2015 18:58
-
-
Save natpen/eb8f36635a75f2e9bf8f to your computer and use it in GitHub Desktop.
Revisions
-
natpen created this gist
Jul 29, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ var spawn = require('child_process').spawn; var csv = require('csv'); var ls = spawn('git', ['log']); ls.on('close', function (code) { console.log('exit code ' + code); }); var parser = csv.parse({ delimiter: '\t' }); parser.on('data', function(data) { setTimeout(function() { console.log('data'); }, 30); }); parser.on('end', function() { console.log('parser end'); }); parser.on('finish', function() { console.log('parser finish'); }); ls.stdout.pipe(parser);