<commit_before>'use strict';
const createError = require('http-errors');
const statuses = require('statuses');
module.exports = {
	// eslint-disable-next-line babel/object-shorthand
	throw: function () {
		// eslint-disable-next-line prefer-spread
		throw createError.apply(null, arguments);
	},
	onerror: (context, err) => {
		if (!err) {
			return;
		}

		if (!(err instanceof Error)) {
			err = new Error(`non-error thrown: ${err}`);
		}

		// ENOENT support
		if (err.code === 'ENOENT') {
			err.status = 404;
		}
<commit_msg>fix linting issue<commit_after>'use strict';
const createError = require('http-errors');
const statuses = require('statuses');

module.exports = {
	// eslint-disable-next-line babel/object-shorthand
	throw: function () {
		// eslint-disable-next-line prefer-spread
		throw createError.apply(null, arguments);
	},
	onerror: (context, err) => {
		if (!err) {
			return;
		}

		if (!(err instanceof Error)) {
			err = new Error(`non-error thrown: ${err}`);
		}

		// ENOENT support
		if (err.code === 'ENOENT') {
			err.status = 404;
		}

{'fraction_non_alphanumeric': 0.1727699530516432, 'fraction_numerical': 0.005633802816901409, 'mean_word_length': 3.5555555555555554, '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': '4454897', 'n_tokens_mistral': 406, 'n_tokens_neox': 365, 'n_words': 82}