<commit_before>import toPairs from 'lodash/toPairs'
import fromPairs from 'lodash/fromPairs'

const whitelist = new Set([
	'clbid',
	'credits',
	'crsid',
	'department',
	'gereqs',
	'groupid',
	'level',
	'name',
	'number',
	'pf',
	'semester',
	'type',
	'year',
])

const mapping = new Map([])

export function alterForEvaluation(course) {
	course = {...course}

	for (let [fromKey, toKey] of mapping.entries()) {
		if (course.hasOwnProperty(fromKey)) {
			course[toKey] = course[fromKey]
		}
	}

	let pairs = toPairs(course).filter(([key]) => whitelist.has(key))
	return fromPairs(pairs)
}<commit_msg>commence expanding flow coverage<commit_after>// @flow

import toPairs from 'lodash/toPairs'
import fromPairs from 'lodash/fromPairs'

import type {Course} from '@gob/types'
import type {Course as TrimmedCourse} from '@gob/examine-student'

const whitelist = new Set([
	'clbid',
	'credits',
	'crsid',
	'department',
	'gereqs',
	'groupid',
	'level',
	'name',
	'number',
	'pf',
	'semester',
	'type',
	'year',
])

const mapping = new Map([])

export function alterForEvaluation(course: Course): TrimmedCourse {
	course = {...course}

	for (let [fromKey, toKey] of mapping.entries()) {
		if (course.hasOwnProperty(fromKey)) {
			course[toKey] = course[fromKey]
		}
	}

	let pairs = toPairs(course).filter(([key]) => whitelist.has(key))
	return (fromPairs(pairs): any)
}
{'fraction_non_alphanumeric': 0.17216117216117216, 'fraction_numerical': 0.0, 'mean_word_length': 4.939130434782609, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1550430', 'n_tokens_mistral': 550, 'n_tokens_neox': 522, 'n_words': 120}