<commit_before>calculateScore = require("../calculateScore.js")

module.exports = function(url, cb) {
	if (!url) {
		return cb("URL not found")
	}
	tests = [{
		description: "submitted url was `http://sparkboulder.com`", // the thing pumped back into slack
		assert: function(url) {
			if (url == "http://sparkboulder.com") {
				this.passed = true
			} else {
				this.passed = false
			}
		}
	}]
	for (test of tests) {
		test.assert(url)
		delete test.assert
	}
	scoreObject = {
		score: calculateScore(tests),
		tests: tests
	}
	return cb(null, scoreObject)
}
<commit_msg>linting<commit_after>var calculateScore = require("../calculateScore.js");

module.exports = function(url, cb) {
	if (!url) {
		return cb("URL not found");
	}
	var tests = [{
		description: "submitted url was `http://sparkboulder.com`", // the thing pumped back into slack
		assert: function(url) {
			if (url == "http://sparkboulder.com") {
				this.passed = true;
			} else {
				this.passed = false;
			}
		}
	}];
	for (var test of tests) {
		test.assert(url);
		delete test.assert;
	}
	var scoreObject = {
		score: calculateScore(tests),
		tests: tests
	};
	return cb(null, scoreObject);
};

{'fraction_non_alphanumeric': 0.15726495726495726, 'fraction_numerical': 0.0, 'mean_word_length': 3.353159851301115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6856258', 'n_tokens_mistral': 463, 'n_tokens_neox': 406, 'n_words': 100}