<commit_before>import Route from 'route-parser';

type $RouteParser = { match: Function, reverse: Function };
export type $FormattedRoutes = [
	{ route: $RouteParser, component: ReactClass }
];

const formatRoutes = (routes: $RouteConfig): $FormattedRoutes => {
	return Object.keys(routes).map(key => {
		const route = routes[key];
		return { route: new Route(key), component: route.component };
	});
};

export default formatRoutes;<commit_msg>Pass on all route components in result of 'formatRoutes'<commit_after>import Route from 'route-parser';

type $RouteParser = { match: Function, reverse: Function };
export type $FormattedRoutes = [
	{ route: $RouteParser, component: ReactClass }
];

const formatRoutes = (routes: $RouteConfig): $FormattedRoutes => {
	return Object.keys(routes).map(key => {
		const route = routes[key];
		return { route: new Route(key), ...route };
	});
};

export default formatRoutes;
{'fraction_non_alphanumeric': 0.14098360655737704, 'fraction_numerical': 0.0, 'mean_word_length': 5.361111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5364682', 'n_tokens_mistral': 278, 'n_tokens_neox': 276, 'n_words': 78}