<commit_before>var dolce = require('dolce'),
crema = require('crema');

exports.create = function(app) {
	
	var self = {},
	_routeCollections = {};


	self.on = function(typeOrObj, callback) {
		
		if(typeof typeOrObj == 'object') {
			
			for(var type in typeOrObj) {
				
				self.on(type, ypeOrObj[type]);

			}

			return;
		}

		crema(typeOrObj).forEach(function(route) {

			_collection(route.type).addRoute(route, callback);

		});

	}

	function _collection(type) {
		type = type.toUpperCase();
		return _routeCollections[type] || (_routeCollections[type] = dolce.collection());
	}

	app.use(function(req, res, next) {
		
		var chain = _collection(req.method).get(req.url);
		
		
	});

	return self;
}<commit_msg>started<commit_after>var dolce = require('dolce'),
crema = require('crema');





exports.create = function() {
	
	var self = {},
	_routeCollections = {};


	self.on = function(typeOrObj, callback) {
		
		if(typeof typeOrObj == 'object') {
			
			for(var type in typeOrObj) {
				
				self.on(type, ypeOrObj[type]);

			}

			return;
		}

		crema(typeOrObj).forEach(function(route) {

			_collection(route.type).addRoute(route, callback);

		});

	}

	function _collection(type) {
		type = type.toUpperCase();
		return _routeCollections[type] || (_routeCollections[type] = dolce.collection());
	}



	return function(req, res, next) {
		
		var route = _collection(req.method).get(req.url);

		console.log(route);
	}
}
{'fraction_non_alphanumeric': 0.16063977746870653, 'fraction_numerical': 0.0, 'mean_word_length': 3.641935483870968, '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': '3041384', 'n_tokens_mistral': 587, 'n_tokens_neox': 485, 'n_words': 84}