Compare commits
No commits in common. "master" and "v1.1.9" have entirely different histories.
@ -1,12 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 2025-05-13 - 1.1.10 - fix(documentation)
|
|
||||||
Update documentation and migration guide with standardized method names and deprecation notices.
|
|
||||||
|
|
||||||
- Replaced deprecated getClosestMatchForString with findClosestMatch in code examples.
|
|
||||||
- Replaced deprecated getChangeScoreForString with calculateScores in documentation.
|
|
||||||
- Updated readme plan to mark method naming standardization as completed.
|
|
||||||
|
|
||||||
## 2025-05-12 - 1.1.9 - fix(core)
|
## 2025-05-12 - 1.1.9 - fix(core)
|
||||||
Update build scripts, refine testing assertions, and enhance documentation
|
Update build scripts, refine testing assertions, and enhance documentation
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartfuzzy",
|
"name": "@push.rocks/smartfuzzy",
|
||||||
"version": "1.1.10",
|
"version": "1.1.9",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A library for fuzzy matching strings against word dictionaries or arrays, with support for object and article searching.",
|
"description": "A library for fuzzy matching strings against word dictionaries or arrays, with support for object and article searching.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
14
readme.md
14
readme.md
@ -34,20 +34,12 @@ const mySmartFuzzy = new Smartfuzzy(myDictionary);
|
|||||||
mySmartFuzzy.addToDictionary('Microsoft');
|
mySmartFuzzy.addToDictionary('Microsoft');
|
||||||
mySmartFuzzy.addToDictionary(['Google', 'Facebook']);
|
mySmartFuzzy.addToDictionary(['Google', 'Facebook']);
|
||||||
|
|
||||||
// Finding the closest match
|
// Getting the closest match
|
||||||
const searchResult = mySmartFuzzy.findClosestMatch('Appl');
|
const searchResult = mySmartFuzzy.getClosestMatchForString('Appl');
|
||||||
console.log(searchResult); // Output: "Apple Inc."
|
console.log(searchResult); // Output: "Apple Inc."
|
||||||
|
|
||||||
// Calculate similarity scores for all dictionary entries
|
|
||||||
const scores = mySmartFuzzy.calculateScores('Appl');
|
|
||||||
console.log(scores);
|
|
||||||
// Output: { 'Sony': 4, 'Deutsche Bahn': 11, 'Apple Inc.': 5, ... }
|
|
||||||
// Lower scores indicate better matches
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This example demonstrates how to instantiate the `Smartfuzzy` class with a list of strings (dictionary) and add more entries to it. You can then use it to find the closest match or calculate similarity scores for a given search string.
|
This example demonstrates how to instantiate the `Smartfuzzy` class with a list of strings (dictionary) and add more entries to it. You can then use it to get the closest match for a given search string.
|
||||||
|
|
||||||
> **Note:** The older method names `getClosestMatchForString` and `getChangeScoreForString` are still available for backward compatibility but are deprecated. It's recommended to use the new method names `findClosestMatch` and `calculateScores` instead.
|
|
||||||
|
|
||||||
### Advanced Object Sorting
|
### Advanced Object Sorting
|
||||||
|
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
- Tests improved with proper assertions and error handling
|
- Tests improved with proper assertions and error handling
|
||||||
- Input validation added to all public methods
|
- Input validation added to all public methods
|
||||||
- Code documented with comprehensive TypeScript JSDoc comments
|
- Code documented with comprehensive TypeScript JSDoc comments
|
||||||
- Method names standardized for better API consistency
|
|
||||||
- Backward compatibility maintained through deprecated method aliases
|
|
||||||
|
|
||||||
## Improvement Plan - Fuse.js Optimization Focus
|
## Improvement Plan - Fuse.js Optimization Focus
|
||||||
|
|
||||||
@ -76,13 +74,13 @@
|
|||||||
### 3. API Improvements
|
### 3. API Improvements
|
||||||
|
|
||||||
#### 3.1 Standardize Method Naming
|
#### 3.1 Standardize Method Naming
|
||||||
- [x] Standardize all method names for consistency
|
- [ ] Standardize all method names for consistency
|
||||||
- **Implementation completed**:
|
- **Implementation approach**:
|
||||||
- Renamed `getClosestMatchForString` to `findClosestMatch`
|
- Rename `getClosestMatchForString` to `findClosestMatch`
|
||||||
- Renamed `getChangeScoreForString` to `calculateScores`
|
- Rename `getChangeScoreForString` to `calculateScores`
|
||||||
- Created backward compatibility aliases with @deprecated tags
|
- Create backward compatibility aliases with @deprecated tags
|
||||||
- Updated all tests with new method names
|
- Update all tests and documentation with new method names
|
||||||
- ✓ Tests pass and build succeeds
|
- Add migration guide for users
|
||||||
|
|
||||||
#### 3.2 Add Chainable API
|
#### 3.2 Add Chainable API
|
||||||
- [ ] Create a more fluent API for complex searches
|
- [ ] Create a more fluent API for complex searches
|
||||||
@ -146,7 +144,7 @@
|
|||||||
## Implementation Priority
|
## Implementation Priority
|
||||||
|
|
||||||
### Phase 1: Core Improvements (1-2 weeks)
|
### Phase 1: Core Improvements (1-2 weeks)
|
||||||
- [x] API Improvements (3.1 Standardize Method Naming) ✓ COMPLETED
|
- [ ] API Improvements (3.1 Standardize Method Naming)
|
||||||
- [ ] Configurability Enhancements (1.1 Enhance Configurability)
|
- [ ] Configurability Enhancements (1.1 Enhance Configurability)
|
||||||
- [ ] Documentation Updates (4.1 Create Comprehensive Documentation)
|
- [ ] Documentation Updates (4.1 Create Comprehensive Documentation)
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartfuzzy',
|
name: '@push.rocks/smartfuzzy',
|
||||||
version: '1.1.10',
|
version: '1.1.9',
|
||||||
description: 'A library for fuzzy matching strings against word dictionaries or arrays, with support for object and article searching.'
|
description: 'A library for fuzzy matching strings against word dictionaries or arrays, with support for object and article searching.'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user