<commit_before>Kimbo.define('traversing', function (_) {

  'use strict';

  _.filter = Array.prototype.filter;

  var query = Kimbo.require('query');

  var IS_UNIQUE = {
    children: true,
    contents: true,
    next: true,
    prev: true
  };

  var _matchesSelector = document.documentElement.webkitMatchesSelector ||
    document.documentElement.mozMatchesSelector ||
    document.documentElement.oMatchesSelector ||
    document.documentElement.matchesSelector;

  function _matches(elem, selector) {
    return (!elem || elem.nodeType !== 1) ? false : _matchesSelector.call(elem, selector);
  }

  function _unique(array) {
    return array.filter(function (item, index) {
      return array.indexOf(item) === index;
    });
  }

  function _sibling (node, elem) {
    var result = [];
    for (; node; node = node.nextSibling) {
      if (node.nodeType === 1 && node !== elem ) {
        result.push(node);
      }
    }
    return result;
  }

  function _singleSibling(node, prop) {
    do {
      node = node[prop];
    } while (node && node.nodeType !== 1);

    return node;
  }

  Kimbo.fn.extend({

    /*\
     * $(…).filter
     [ method ]
     * Filter element collection by the passed argument.
     > Parameters
     - selector (string|object|function) The argument by which the collection will be filtered.
     = (object) Filtered elements collection.
     > Usage
     | <ul>
     |   <li>One</li>
     |   <li>Two</li>
     |   <li>Three</li><commit_msg>small code style changes<commit_after>Kimbo.define('traversing', function (_) {

  'use strict';

  _.filter = Array.prototype.filter;

  var query = Kimbo.require('query');

  var IS_UNIQUE = {
    children: true,
    contents: true,
    next: true,
    prev: true
  };

  var _matchesSelector = document.documentElement.webkitMatchesSelector ||
    document.documentElement.mozMatchesSelector ||
    document.documentElement.oMatchesSelector ||
    document.documentElement.matchesSelector;

  function _matches(elem, selector) {
    return (!elem || elem.nodeType !== 1) ? false : _matchesSelector.call(elem, selector);
  }

  function _unique(array) {
    return array.filter(function (item, index) {
      return array.indexOf(item) === index;
    });
  }

  function _sibling(node, elem) {
    var result = [];
    for (; node; node = node.nextSibling) {
      if (node.nodeType === 1 && node !== elem ) {
        result.push(node);
      }
    }
    return result;
  }

  function _singleSibling(node, prop) {
    do {
      node = node[prop];
    } while (node && node.nodeType !== 1);

    return node;
  }

  Kimbo.fn.extend({

    /*\
     * $(…).filter
     [ method ]
     * Filter element collection by the passed argument.
     > Parameters
     - selector (string|object|function) The argument by which the collection will be filtered.
     = (object) Filtered elements collection.
     > Usage
     | <ul>
     |   <li>One</li>
     |   <li>Two</li>
     |   <li>Three</li>
{'fraction_non_alphanumeric': 0.13468013468013468, 'fraction_numerical': 0.00202020202020202, 'mean_word_length': 2.699875466998755, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '2834863', 'n_tokens_mistral': 943, 'n_tokens_neox': 910, 'n_words': 211}