<commit_before>// Extensions
(function( undefined ){
	wrap.fn.filter = function( sel ){
		var ret = [],
			sel = wrap( sel );
		this.each(function( i ){
			if( wrap.inArray( sel, this ) ){
				ret.push( this );				
			}
		});
		return wrap( ret );
	};
})();<commit_msg>emboldened the filter method to work with unappended nodes. This helps with filtering content before it's inserted into the dom.<commit_after>// Extensions
(function( undefined ){
	wrap.fn.filter = function( sel ){
		var ret = [],
			wsel =  wrap( sel );

		this.each(function(){
			
			if( !this.parentNode ){
				var context = wrap( document.createDocumentFragment() );
				context[ 0 ].appendChild( this );
				wsel = wrap( sel, context );
			}
			
			if( wrap.inArray( wsel, this ) ){
				ret.push( this );				
			}
		});

		return wrap( ret );
	};
})();
{'fraction_non_alphanumeric': 0.1608222490931076, 'fraction_numerical': 0.0012091898428053204, 'mean_word_length': 2.815668202764977, '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': '2241848', 'n_tokens_mistral': 323, 'n_tokens_neox': 267, 'n_words': 78}