<commit_before>import cond from 'lodash.cond'
import builtinModules from 'builtin-modules'
import { basename, join } from 'path'

import resolve from './resolve'

function constant(value) {
  return () => value
}

function isBuiltIn(name) {
  return builtinModules.indexOf(name) !== -1
}

const externalModuleRegExp = /^\w/
function isExternalModule(name, path) {
  if (!externalModuleRegExp.test(name)) return false
  return (!path || path.includes(join('node_modules', name)))
}

function isProjectModule(name, path) {
  if (!externalModuleRegExp.test(name)) return false
  return (path && !path.includes(join('node_modules', name)))
}

function isRelativeToParent(name) {
  return name.indexOf('../') === 0
}
<commit_msg>oh, node 0.x. includes => -1 ~ indexOf<commit_after>import cond from 'lodash.cond'
import builtinModules from 'builtin-modules'
import { basename, join } from 'path'

import resolve from './resolve'

function constant(value) {
  return () => value
}

function isBuiltIn(name) {
  return builtinModules.indexOf(name) !== -1
}

const externalModuleRegExp = /^\w/
function isExternalModule(name, path) {
  if (!externalModuleRegExp.test(name)) return false
  return (!path || -1 < path.indexOf(join('node_modules', name)))
}

function isProjectModule(name, path) {
  if (!externalModuleRegExp.test(name)) return false
  return (path && -1 === path.indexOf(join('node_modules', name)))
}

function isRelativeToParent(name) {
  return name.indexOf('../') === 0
}

{'fraction_non_alphanumeric': 0.14979757085020243, 'fraction_numerical': 0.005398110661268556, 'mean_word_length': 5.153526970954357, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '1840605', 'n_tokens_mistral': 466, 'n_tokens_neox': 466, 'n_words': 119}