<commit_before>const fs = require('fs')
const path = require('path')
const normalizeNewline = require('normalize-newline')

const FIELDS = [
  'bin',
  'typings', // TypeScript
  'module', // https://github.com/stereobooster/package.json#module used by rollup, webpack
  'es2015' // https://github.com/stereobooster/package.json#es2015 used by Angular
]

// Check fields for file existance

function doesntExist (dir, file) {
  return !fs.existsSync(path.join(dir, file))
}

function checkField (pkg, dir, field) {
  const errors = []

  if (pkg[field]) {
    if (pkg[field] instanceof Object) {<commit_msg>Check for both possibilities of TypeScript definitions. (#5)<commit_after>const fs = require('fs')
const path = require('path')
const normalizeNewline = require('normalize-newline')

const FIELDS = [
  'bin',
  'types', // https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html used by TypeScript
  'typings', // https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html alternatively used by TypeScript
  'module', // https://github.com/stereobooster/package.json#module used by rollup, webpack
  'es2015' // https://github.com/stereobooster/package.json#es2015 used by Angular
]

// Check fields for file existance

function doesntExist (dir, file) {
  return !fs.existsSync(path.join(dir, file))
}

function checkField (pkg, dir, field) {
  const errors = []

  if (pkg[field]) {
    if (pkg[field] instanceof Object) {
{'fraction_non_alphanumeric': 0.1417910447761194, 'fraction_numerical': 0.011533242876526458, 'mean_word_length': 4.52434456928839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '4831358', 'n_tokens_mistral': 493, 'n_tokens_neox': 468, 'n_words': 116}