index.js
function fuzzyStringCompare(a, b, tolerence) {
	if (a == b) return true;

	var as = stripNoise(a);
	as = as.toLowerCase();
	if (as.length > 255) as = as.substr(0, 255);

	var bs = stripNoise(b);
	bs = bs.toLowerCase();
	if (bs.length > 255) bs = bs.substr(0, 255);

	if (tolerence == undefined && levenshtein(as, bs) < 10) return true;
	if (tolerence && levenshtein(as, bs) <= tolerence) return true;
}
function fuzzyStringCompare(a, b, tolerence) {
	if (a == b) return true;

	var as = stripNoise(a);
	as = as.toLowerCase();
	if (as.length > 255) as = as.substr(0, 255);

	var bs = stripNoise(b);
	bs = bs.toLowerCase();
	if (bs.length > 255) bs = bs.substr(0, 255);

	if (tolerence == undefined && levenshtein(as, bs) < 10) return true;
	if (tolerence && levenshtein(as, bs) <= tolerence) return true;
}
function fuzzyStringCompare ( a , b , tolerence ) { if ( a == b ) return true ; var as = stripNoise ( a ) ; as = as . toLowerCase ( ) ; if ( as . length > 255 ) as = as . substr ( 0 , 255 ) ; var bs = stripNoise ( b ) ; bs = bs . toLowerCase ( ) ; if ( bs . length > 255 ) bs = bs . substr ( 0 , 255 ) ; if ( tolerence == undefined && levenshtein ( as , bs ) < 10 ) return true ; if ( tolerence && levenshtein ( as , bs ) <= tolerence ) return true ; }
Fuzzily compare strings a and b
@param string a The first string to compare
@param string b The second string to compare
@param number tolerence The tolerence when comparing using levenshtein, defaults to 10
@return boolean True if a ≈ b
Fuzzily compare strings a and b