<commit_before>/* globals $:false, k:false, _:false, interpolate:false, Modernizr:false */
// Use a global k to share data accross JS files
window.k = window.k || {};

(function () {
  k.LAZY_DELAY = 500;  // delay to lazy loading scripts, in ms
  k.STATIC_URL = $('body').data('static-url');
  k.getPathAsDict = function(propertyNames) {
    let pathDict = {},
      pathArray = window.location.pathname.split('/').filter(Boolean);

    propertyNames.map((x, i) =>
      pathDict[x] = pathArray[i]);

    return pathDict;
  };

  k.pathStringFromDict = function(pathDict) {
    let pathString = '';

    _.forEach(pathDict, function(value, key) {
      if (value) {
        pathString += '/' + value;
      }
    });

    return pathString;
  };

  k.getQueryParamsAsDict = function (url) {<commit_msg>Don't use ES6 in main.js<commit_after>/* globals $:false, k:false, _:false, interpolate:false, Modernizr:false */
// Use a global k to share data accross JS files
window.k = window.k || {};

(function () {
  k.LAZY_DELAY = 500;  // delay to lazy loading scripts, in ms
  k.STATIC_URL = $('body').data('static-url');
  k.getPathAsDict = function(propertyNames) {
    var pathDict = {},
      pathArray = window.location.pathname.split('/').filter(Boolean);

    propertyNames.map(function(value, index) {
      pathDict[value] = pathArray[index];
    });

    return pathDict;
  };

  k.pathStringFromDict = function(pathDict) {
    var pathString = '';

    _.forEach(pathDict, function(value, key) {
      if (value) {
        pathString += '/' + value;
      }
    });

    return pathString;
  };

  k.getQueryParamsAsDict = function (url) {
{'fraction_non_alphanumeric': 0.1572556162720097, 'fraction_numerical': 0.004250151791135397, 'mean_word_length': 3.109725685785536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1194011', 'n_tokens_mistral': 563, 'n_tokens_neox': 537, 'n_words': 122}