Comparing version 4.0.2 to 4.0.3
@@ -17,13 +17,7 @@ /** | ||
} | ||
var reshapedQuery = query; | ||
var reshapedSource = source; | ||
var reshapedQuery = query.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
var reshapedSource = source.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
if (!opts.caseSensitive) { | ||
reshapedQuery = query | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, ''); | ||
reshapedSource = source | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, ''); | ||
reshapedQuery = reshapedQuery.toLowerCase(); | ||
reshapedSource = reshapedSource.toLowerCase(); | ||
} | ||
@@ -30,0 +24,0 @@ return [reshapedQuery, reshapedSource]; |
@@ -23,13 +23,7 @@ (function (global, factory) { | ||
} | ||
var reshapedQuery = query; | ||
var reshapedSource = source; | ||
var reshapedQuery = query.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
var reshapedSource = source.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
if (!opts.caseSensitive) { | ||
reshapedQuery = query | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, ''); | ||
reshapedSource = source | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, ''); | ||
reshapedQuery = reshapedQuery.toLowerCase(); | ||
reshapedSource = reshapedSource.toLowerCase(); | ||
} | ||
@@ -36,0 +30,0 @@ return [reshapedQuery, reshapedSource]; |
@@ -19,13 +19,7 @@ "use strict"; | ||
} | ||
var reshapedQuery = query; | ||
var reshapedSource = source; | ||
var reshapedQuery = query.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
var reshapedSource = source.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | ||
if (!opts.caseSensitive) { | ||
reshapedQuery = query | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, ''); | ||
reshapedSource = source | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, ''); | ||
reshapedQuery = reshapedQuery.toLowerCase(); | ||
reshapedSource = reshapedSource.toLowerCase(); | ||
} | ||
@@ -32,0 +26,0 @@ return [reshapedQuery, reshapedSource]; |
{ | ||
"name": "fuzzyjs", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Fuzzy matching in Javascript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -21,14 +21,8 @@ import { TestOptions } from '../test' | ||
let reshapedQuery = query | ||
let reshapedSource = source | ||
let reshapedQuery = query.normalize('NFD').replace(/[\u0300-\u036f]/g, '') | ||
let reshapedSource = source.normalize('NFD').replace(/[\u0300-\u036f]/g, '') | ||
if (!opts.caseSensitive) { | ||
reshapedQuery = query | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, '') | ||
reshapedSource = source | ||
.toLowerCase() | ||
.normalize('NFD') | ||
.replace(/[\u0300-\u036f]/g, '') | ||
reshapedQuery = reshapedQuery.toLowerCase() | ||
reshapedSource = reshapedSource.toLowerCase() | ||
} | ||
@@ -35,0 +29,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
724518
64
26190