<commit_before>/*
 * FuzzySearch
 * https://github.com/myork/FuzzySearch
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */

/**
 TODO

 - Get benchmarks up
 - Get benchmarks running in the browser
 - Compare performance using my own position function to the regex function
 - Accept a template function to wrap each character. e.g. <span>m</span>atch
 */

(function() {

var root = this;

var fuzzy = {};

if (typeof exports !== 'undefined') {
  module.exports = fuzzy;
} else {
  root.fuzzy = fuzzy;
}

function fuzzyRegex(str) {
  return new RegExp('.*' + str.split('').join('.*') + '.*');
}

fuzzy.filter = function(str, arr, getStrToTest) {
  var regex = fuzzyRegex(str)
  getStrToTest = getStrToTest || function(el) {
    return el;}<commit_msg>fix syntax error<commit_after>/*
 * FuzzySearch
 * https://github.com/myork/FuzzySearch
 *
 * Copyright (c) 2012 <NAME>
 * Licensed under the MIT license.
 */

/**
 TODO

 - Get benchmarks up
 - Get benchmarks running in the browser
 - Compare performance using my own position function to the regex function
 - Accept a template function to wrap each character. e.g. <span>m</span>atch
 */

(function() {

var root = this;

var fuzzy = {};

if (typeof exports !== 'undefined') {
  module.exports = fuzzy;
} else {
  root.fuzzy = fuzzy;
}

function fuzzyRegex(str) {
  return new RegExp('.*' + str.split('').join('.*') + '.*');
}

fuzzy.filter = function(str, arr, getStrToTest) {
  var regex = fuzzyRegex(str)
  getStrToTest = getStrToTest || function(el) {
    return el;
{'fraction_non_alphanumeric': 0.14702072538860103, 'fraction_numerical': 0.0051813471502590676, 'mean_word_length': 3.530791788856305, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '2674968', 'n_tokens_mistral': 535, 'n_tokens_neox': 490, 'n_words': 153}