<commit_before>function defineProp(name, value){
	delete module.exports[name];
	module.exports[name] = value;
	return value;
}

module.exports = {
	parseDOM: function (html) {
		var handler = new module.exports.DomHandler();
		var parser = new module.exports.Parser(handler);
		parser.parseComplete(html);
		return handler.dom;
	},
	parseFeed: function (feed) {
		var handler = new module.exports.FeedHandler();
		var parser = new module.exports.Parser(handler);
		parser.parseComplete(feed);
		return handler.dom;
	},
	get Parser(){
		return defineProp("Parser", require("./Parser.js"));
	},
	get DomHandler(){
		return defineProp("DomHandler", require("domhandler"));
	},
	get FeedHandler(){
		return defineProp("FeedHandler", require("./FeedHandler.js"));
	},
	get Tokenizer(){
		return defineProp("Tokenizer", require("./Tokenizer.js"));
	},
	get ElementType(){
		return defineProp("ElementType", require("domelementtype"));
	},
	get Stream(){
		return defineProp("Stream", require("./Stream.js"));
	},
	get WritableStream(){
		return defineProp("WritableStream", require("./WritableStream.js"));
	},
	get ProxyHandler(){
		return defineProp("ProxyHandler", require("./ProxyHandler.js"));
	},
	get DomUtils(){
		return defineProp("DomUtils", require("domutils"));
	},
	get CollectingHandler(){
		return defineProp("CollectingHandler", require("./CollectingHandler.js"));
	},
	// For legacy support
	get DefaultHandler(){
		return defineProp("DefaultHandler", this.DomHandler);
	},
	get RssHandler(){
		return defineProp("RssHandler", this.FeedHandler);
	},
	createDomStream: function(cb, options, elementCb){
		var handler = new module.exports.DomHandler(cb, options, elementCb);
		return new module.exports.Parser(handler, options);
	},
	// List of all events that the parser emits
	EVENTS: { /* Format: eventname: number of arguments */
		attribute: 2,
		cdatastart: 0,
		cdataend: 0,
		text: 1,
		processinginstruction: 2,
		comment: 1,<commit_msg>[index] statically export Parser, Tokenizer and DomHandler<commit_after>var Parser = require("./Parser.js"),
    DomHandler = require("domhandler");

function defineProp(name, value){
	delete module.exports[name];
	module.exports[name] = value;
	return value;
}

module.exports = {
	Parser: Parser,
	Tokenizer: require("./Tokenizer.js"),
	ElementType: require("domelementtype"),
	DomHandler: DomHandler,
	get FeedHandler(){
		return defineProp("FeedHandler", require("./FeedHandler.js"));
	},
	get Stream(){
		return defineProp("Stream", require("./Stream.js"));
	},
	get WritableStream(){
		return defineProp("WritableStream", require("./WritableStream.js"));
	},
	get ProxyHandler(){
		return defineProp("ProxyHandler", require("./ProxyHandler.js"));
	},
	get DomUtils(){
		return defineProp("DomUtils", require("domutils"));
	},
	get CollectingHandler(){
		return defineProp("CollectingHandler", require("./CollectingHandler.js"));
	},
	// For legacy support
	DefaultHandler: DomHandler,
	get RssHandler(){
		return defineProp("RssHandler", this.FeedHandler);
	},
	//helper methods
	parseDOM: function(data, options) {
		var handler = new DomHandler(options);
		var parser = new Parser(handler, options);
		parser.end(data);
		return handler.dom;
	},
	parseFeed: function(feed, options){
		var handler = new module.exports.FeedHandler();
		var parser = new Parser(handler);
		parser.end(feed);
		return handler.dom;
	},
	createDomStream: function(cb, options, elementCb){
		var handler = new DomHandler(cb, options, elementCb);
		return new Parser(handler, options);
	},
	// List of all events that the parser emits
	EVENTS: { /* Format: eventname: number of arguments */
		attribute: 2,
		cdatastart: 0,
		cdataend: 0,
		text: 1,
		processinginstruction: 2,
		comment: 1,
{'fraction_non_alphanumeric': 0.1544235924932976, 'fraction_numerical': 0.0032171581769436996, 'mean_word_length': 5.1976744186046515, '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': '3543139', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1145, 'n_words': 280}