{"size": 453, "ext": "js", "max_stars_repo_path": "bin/headers.js", "max_stars_repo_name": "tesera/bawlk", "max_stars_repo_stars_event_min_datetime": "2015-02-20T15:38:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-17T05:07:31.000Z", "max_issues_repo_path": "bin/headers.js", "max_issues_repo_name": "tesera/bawlk", "max_issues_repo_issues_event_min_datetime": "2015-04-17T18:27:30.000Z", "max_issues_repo_issues_event_max_datetime": "2017-02-14T03:03:16.000Z", "max_forks_repo_path": "bin/headers.js", "max_forks_repo_name": "tesera/bawlk", "max_forks_repo_forks_event_min_datetime": "2015-04-01T13:48:37.000Z", "max_forks_repo_forks_event_max_datetime": "2015-04-01T13:48:37.000Z"}
{"max_stars_count": 5, "max_issues_count": 5, "max_forks_count": 1, "avg_line_length": 32.3571428571, "max_line_length": 78, "alphanum_fraction": 0.6490066225}
#!/usr/bin/env node
var es = require('event-stream');
var JSONStream = require('JSONStream');

process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin
    .pipe(JSONStream.parse('resources.*'))
    .pipe(es.map(function (resource, callback) {
        var headers = resource.schema.fields.map(function(f) {return f.name});
        callback(null, ['', resource.path, headers.join(','), ''].join('\n'));
    }))
    .pipe(process.stdout);