<commit_before>'use strict';

var path = require('path')
  , DRIVE_REGEX = /^\w:\\/
  , resolvePath
  , isAbsolute
  ;

// resolvePath
// ===========
//
// resolvePath is a function that determines the absolute path to a file given a
// filepath. If the filepath begins with a `/`, then it is assumes that an
// absolute path was given. Otherwise, it assumes a relative path was given, and
// it will be based on `process.cwd()`.
//
// ### Parameters
//
// - `filepath` (String) - The path to the file. It can be absolute or relative
//
// ### Returns
//
// - `filepath` (String) - the filepath given, but in absolute form. If the
// given path was relative, then it will assume that it's relative based on
// `process.cwd()`.
resolvePath = function (filepath) {
  if (isAbsolute(filepath)) {
    return filepath;
  } else {
    return path.join(process.cwd(), filepath);
  }
};

isAbsolute = function (filepath) {
  var abs;
  // This is kind of a hacky way of doing things. This brings up the issue of
  // whether or not we should be using relative paths throughout or not.
  switch (process.platform) {
    case 'win32':
      abs = !!filepath.match(DRIVE_REGEX);
      break;
    default:
      abs = filepath.charAt(0) === path.sep;
  }
  return abs;<commit_msg>ignoring windows specific test case<commit_after>'use strict';

var path = require('path')
  , DRIVE_REGEX = /^\w:\\/
  , resolvePath
  , isAbsolute
  ;

// resolvePath
// ===========
//
// resolvePath is a function that determines the absolute path to a file given a
// filepath. If the filepath begins with a `/`, then it is assumes that an
// absolute path was given. Otherwise, it assumes a relative path was given, and
// it will be based on `process.cwd()`.
//
// ### Parameters
//
// - `filepath` (String) - The path to the file. It can be absolute or relative
//
// ### Returns
//
// - `filepath` (String) - the filepath given, but in absolute form. If the
// given path was relative, then it will assume that it's relative based on
// `process.cwd()`.
resolvePath = function (filepath) {
  if (isAbsolute(filepath)) {
    return filepath;
  } else {
    return path.join(process.cwd(), filepath);
  }
};

isAbsolute = function (filepath) {
  var abs;
  // This is kind of a hacky way of doing things. This brings up the issue of
  // whether or not we should be using relative paths throughout or not.
  /* istanbul ignore next */
  switch (process.platform) {
    case 'win32':
      abs = !!filepath.match(DRIVE_REGEX);
      break;
    default:
      abs = filepath.charAt(0) === path.sep;
  }
  return abs;
{'fraction_non_alphanumeric': 0.13451874758407423, 'fraction_numerical': 0.0023192887514495554, 'mean_word_length': 2.885885885885886, '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': '5679764', 'n_tokens_mistral': 795, 'n_tokens_neox': 791, 'n_words': 312}