<commit_before>// version 0.0.1
//

// overview
// ========
// t.js is a tree-traversal library.  its only assumption is that the trees it
// traverses are made up of objects with 'children' arrays:
//
//      {
//          children: [
//              { },
//              {
//                  children: [
//                      { },
//                      { }
//                  ]
//              }
//          ]
//      }
//
// testing
// -------
// unit tests are provided courtesy of
// [`mocha.js`](http://visionmedia.github.com/mocha/) and
// [`chai`](http://chaijs.com/).  on a unix system they can be run from the
// command line with:
//
//      $ make test
//
// or viewed in most any system with a modern browser by opening the
// `index.html` file.
//
(function() {


// usage
// -----
// the `t` interface is exported in either the browser or server.  (got this
// from [`underscore.js`](http://documentcloud.github.com/underscore/))
//
var t = {};

if (typeof exports !== 'undefined') {
    if (typeof module !== 'undefined' && module.exports) {
        exports = module.exports = t;
    }
    exports.t = t;
} else if (typeof define === 'function' && define.amd) {
    // if using an AMD library like [`require.js`](http://requirejs.org/), the
    // library is exported with path `t`
    define('t', function() {
        return t;
    });
}

var isArray = function(o) {
    return toString.call(o) == '[object Array]';
};


// available functions
// ===================
//
// t.dfs()
// -------
// perform a depth-first search, executing the given callback at each node.
//
//      t.dfs(node, [config], function(node, par, ctrl) {
//          /* ... */
//      })
//
// - `node`:
//      object where the search will start.  this could also be an array of
//      objects
// - `config`:
//      this is used for specifying things like pre/post order traversal
//      (currently not implemented)
// - `callback` (last argument):
//      function to be executed at each node.  the arguments are:
//      - `node`: the current node
//      - `par`: the current node's parent
//      - `ctrl`: control object.  setting the `stop` property of this will end
//      the search, setting the `cutoff` property of this will not visit any
//      children of this node<commit_msg>fixed bug in 'toString' call<commit_after>// version 0.0.1
//

// overview
// ========
// t.js is a tree-traversal library.  its only assumption is that the trees it
// traverses are made up of objects with 'children' arrays:
//
//      {
//          children: [
//              { },
//              {
//                  children: [
//                      { },
//                      { }
//                  ]
//              }
//          ]
//      }
//
// testing
// -------
// unit tests are provided courtesy of
// [`mocha.js`](http://visionmedia.github.com/mocha/) and
// [`chai`](http://chaijs.com/).  on a unix system they can be run from the
// command line with:
//
//      $ make test
//
// or viewed in most any system with a modern browser by opening the
// `index.html` file.
//
(function() {


// usage
// -----
// the `t` interface is exported in either the browser or server.  (got this
// from [`underscore.js`](http://documentcloud.github.com/underscore/))
//
var t = {};

if (typeof exports !== 'undefined') {
    if (typeof module !== 'undefined' && module.exports) {
        exports = module.exports = t;
    }
    exports.t = t;
} else if (typeof define === 'function' && define.amd) {
    // if using an AMD library like [`require.js`](http://requirejs.org/), the
    // library is exported with path `t`
    define('t', function() {
        return t;
    });
}

var isArray = function(o) {
    return Object.prototype.toString.call(o) == '[object Array]';
};


// available functions
// ===================
//
// t.dfs()
// -------
// perform a depth-first search, executing the given callback at each node.
//
//      t.dfs(node, [config], function(node, par, ctrl) {
//          /* ... */
//      })
//
// - `node`:
//      object where the search will start.  this could also be an array of
//      objects
// - `config`:
//      this is used for specifying things like pre/post order traversal
//      (currently not implemented)
// - `callback` (last argument):
//      function to be executed at each node.  the arguments are:
//      - `node`: the current node
//      - `par`: the current node's parent
//      - `ctrl`: control object.  setting the `stop` property of this will end
//      the search, setting the `cutoff` property of this will not visit any
//      children of this node
{'fraction_non_alphanumeric': 0.17634315424610053, 'fraction_numerical': 0.0012998266897746968, 'mean_word_length': 1.8032786885245902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2022667', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1329, 'n_words': 461}