<commit_before>/*
 * repo-depot
 * https://github.com/filamentgroup/repo-depot
 *
 * Copyright (c) 2015 <NAME>
 * Licensed under the MIT license.
 */


/*global require:true*/
/*global process:true*/
(function(){
  'use strict';

  var http = require( "https" );
  var URL = require( "url" );

  var opts = {
    hostname: 'api.github.com',
    port: 443,
    path: '/orgs/filamentgroup/repos',
    method: 'GET',
    headers: {
      'User-agent': 'jefflembeck'
    }
  };

  var getNextLink = function( linkHeaders ){
    var next;
    if( linkHeaders ){
      next = linkHeaders.split( ',' ).filter(function(linkHeader){
        return linkHeader.match( "rel=\"next\"" );
      });
    }
    return next;
  };

  var deepClone = function( obj ){
    return JSON.parse( JSON.stringify( obj ) );
  };

  var getNextLinkURI = function( next ){
    var url, uri;
    url = next[0].split( ";" )[0];
    url = url.replace( /<(.*)>/, '$1' );
    uri = URL.parse( url );
    return uri;
  };


  var request = function( options ){
    var buffer = "";
    http.get( options, function(res){
      res.on( "data", function( data ){
        buffer += data.toString( "utf-8" );
      });

      res.on( "end", function(){
        var list = JSON.parse( buffer );
        list.forEach(function( repo ){
          process.stdout.write( repo.html_url + " ");
        });

        var next = getNextLink(res.headers.link);
        if( next && next.length ){
          var uri = getNextLinkURI(next);
          var clone = deepClone( options );
          clone.path = uri.path;
          request( clone );
        }
      });
    });
  };

  request(opts);

}());
<commit_msg>Better output<commit_after>/*
 * repo-depot
 * https://github.com/filamentgroup/repo-depot
 *
 * Copyright (c) 2015 <NAME>
 * Licensed under the MIT license.
 */


/*global require:true*/
/*global process:true*/
(function(){
  'use strict';

  var http = require( "https" );
  var URL = require( "url" );

  var opts = {
    hostname: 'api.github.com',
    port: 443,
    path: '/orgs/filamentgroup/repos',
    method: 'GET',
    headers: {
      'User-agent': 'repo-depot'
    }
  };

  var getNextLink = function( linkHeaders ){
    var next;
    if( linkHeaders ){
      next = linkHeaders.split( ',' ).filter(function(linkHeader){
        return linkHeader.match( "rel=\"next\"" );
      });
    }
    return next;
  };

  var deepClone = function( obj ){
    return JSON.parse( JSON.stringify( obj ) );
  };

  var getNextLinkURI = function( next ){
    var url, uri;
    url = next[0].split( ";" )[0];
    url = url.replace( /<(.*)>/, '$1' );
    uri = URL.parse( url );
    return uri;
  };


  var request = function( options ){
    var buffer = "";
    http.get( options, function(res){
      res.on( "data", function( data ){
        buffer += data.toString( "utf-8" );
      });

      res.on( "end", function(){
        var list = JSON.parse( buffer );
        list.forEach(function( repo ){
          process.stdout.write( repo.name + " " +
                                repo.html_url + " "  +
                                repo.open_issues + " " +
                                repo.updated_at + "\n" );
        });

        var next = getNextLink(res.headers.link);
        if( next && next.length ){
          var uri = getNextLinkURI(next);
          var clone = deepClone( options );
          clone.path = uri.path;
          request( clone );
        }
      });
    });
  };

  request(opts);

}());

{'fraction_non_alphanumeric': 0.1699627400401261, 'fraction_numerical': 0.006305531670965893, 'mean_word_length': 2.0060292850990527, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2923919', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1108, 'n_words': 259}