accent-insensitive-search
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -59,4 +59,4 @@ var accentMap = require('./accent-map'); | ||
} | ||
toSearch = toSearch.replace(/\s+|-/g, ' '); | ||
searchIn = searchIn.replace(/\s+|-/g, ' ').toLowerCase(); | ||
toSearch = toSearch.replace(/\.|-/g, ' ').replace(/\s+/g, ' '); | ||
searchIn = searchIn.replace(/\.|-/g, ' ').replace(/\s+/g, ' ').toLowerCase(); | ||
const re = accentRegExp(toSearch, options); | ||
@@ -63,0 +63,0 @@ var allStrings = replaceString(searchIn); |
{ | ||
"name": "accent-insensitive-search", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Javascript plugin to perform an accent-insensitive-search", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,7 @@ var accentInsensitiveSearch = require ('../index'); | ||
tests.push({ | ||
result: accentInsensitiveSearch('mü', 'Muller') === true, | ||
successMsg: 'accentInsensitiveSearch(\'mü\', \'Muller\') is true', | ||
errorMsg: 'accentInsensitiveSearch(\'mü\', \'Muller\') should be true' | ||
}); | ||
tests.push({ | ||
result: accentInsensitiveSearch('mul', 'Müller') === true, | ||
@@ -40,2 +45,7 @@ successMsg: 'accentInsensitiveSearch(\'mul\', \'Müller\') is true', | ||
}); | ||
tests.push({ | ||
result: accentInsensitiveSearch('mr r', 'Mr. Robin') === true, | ||
successMsg: 'accentInsensitiveSearch(\'mr r\', \'Mr. Robin\') is true', | ||
errorMsg: 'accentInsensitiveSearch(\'mr r\', \'Mr. Robin\') should be true' | ||
}); | ||
@@ -42,0 +52,0 @@ var errors = []; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15439
845