Skip to content

v1.0.1 - Minor Improvements and Enhanced Functionality

Latest

Choose a tag to compare

@Kledenai Kledenai released this 20 Apr 20:41

[1.0.1] - 2025-04-20

Added

  • Multiple similarity algorithms:
    • levenshtein (normalized)
    • jaro-winkler
    • ratcliff-obershelp (custom implementation)
    • Default remains the original bigram method
  • Options support in findBestMatch:
    • algorithm: select which similarity strategy to use
    • round: control the precision of the output rating (e.g., 2 decimal places)
  • Exported getSimilarityFn for direct algorithm access:
    • Enables low-level comparisons without using findBestMatch
  • New test suites for:
    • Each similarity algorithm
    • Round precision behavior
    • Utility ratcliffObershelp isolated
    • Exported API surface coverage

Improved

  • Refactored internal architecture for better modularity and separation of concerns:
    • Moved algorithm definitions to similarity.ts
    • Separated types into types.ts
    • Isolated ratcliffObershelp in utils
  • Aligned default behavior of bigram algorithm with expected string normalization
  • Improved project metadata:
    • Updated keywords and description in package.json for better discoverability

Fixed

  • Correct handling of empty strings in ratcliffObershelp to prevent NaN errors

Notes

  • This version lays the groundwork for future support of:
    • Case-insensitive comparison
    • Threshold-based result filtering
    • Custom user-defined similarity functions
    • Locale-aware string comparison