<commit_before>module.exports = {
  getQueryVariable: (query, variable) => {
    if(query == "" || !query || query.indexOf('?') == -1) return "";
    let vars =  decodeURIComponent(query).split('?')[1].split('&')
    for (let i = 0; i < vars.length; i++) {
      let pair = vars[i].split('=')
      if (decodeURIComponent(pair[0]) == variable) {
        return decodeURIComponent(pair[1])
      }
    }
    console.log('Query variable %s not found', variable)
  },

  buildUrlFromState: ($state,$stateParams) => {
    "use strict";
    return $state.href($state.current.name, $stateParams)
  },

  isRelativeUrl: (url) =>{
    if(!url) return false;
    else return ! (url.startsWith('http://') || url.startsWith('https://') || url.startsWith('//'))
  },

  isFileSys: () => window.location.href.startsWith("file://"),

  isProxy: () => !window.location.href.startsWith("file://")
}<commit_msg>added support for W10<commit_after>module.exports = {
  getQueryVariable: (query, variable) => {
    if(query == "" || !query || query.indexOf('?') == -1) return "";
    let vars =  decodeURIComponent(query).split('?')[1].split('&')
    for (let i = 0; i < vars.length; i++) {
      let pair = vars[i].split('=')
      if (decodeURIComponent(pair[0]) == variable) {
        return decodeURIComponent(pair[1])
      }
    }
    console.log('Query variable %s not found', variable)
  },

  buildUrlFromState: ($state,$stateParams) => {
    "use strict";
    return $state.href($state.current.name, $stateParams)
  },

  isRelativeUrl: (url) =>{
    if(!url) return false;
    else return ! (url.startsWith('http://') || url.startsWith('https://') || url.startsWith('//'))
  },

  isFileSys: () => window.location.href.startsWith("file://") || window.location.href.startsWith("ms-appx-web://"),

  isProxy: () => !window.location.href.startsWith("file://") && !window.location.href.startsWith("ms-appx-web://")
}
{'fraction_non_alphanumeric': 0.21912769311613242, 'fraction_numerical': 0.006305832895428271, 'mean_word_length': 3.533333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1264878', 'n_tokens_mistral': 637, 'n_tokens_neox': 648, 'n_words': 113}