@acusti/matchmaking
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -19,2 +19,5 @@ const FIRST_NUMBER = '0'.charCodeAt(0); | ||
const shortestLength = Math.min(strALength, strBLength); | ||
// If one of the texts is empty, they cannot match | ||
if (!shortestLength) | ||
return 0; | ||
// Exact partial match is the next best score to an exact match with | ||
@@ -21,0 +24,0 @@ // relative length from the beginning applying a penalty to total score |
{ | ||
"name": "@acusti/matchmaking", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Intuitive approximate string matching (i.e. fuzzy searches)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -61,2 +61,3 @@ import { describe, expect, it } from 'vitest'; | ||
const FONT_WEIGHT_VALUES = [ | ||
'', | ||
'Font Weight - 100', | ||
@@ -63,0 +64,0 @@ 'Font Weight - 200', |
@@ -22,2 +22,5 @@ const FIRST_NUMBER = '0'.charCodeAt(0); | ||
// If one of the texts is empty, they cannot match | ||
if (!shortestLength) return 0; | ||
// Exact partial match is the next best score to an exact match with | ||
@@ -24,0 +27,0 @@ // relative length from the beginning applying a penalty to total score |
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
19308
330