Closed Camelik closed 11 months ago
This is awesome! Do you think you could add some tests for the new method, please?
Attention: 11 lines
in your changes are missing coverage. Please review.
Comparison is base (
416734d
) 14.08% compared to head (0bf47a1
) 69.13%.
Files | Patch % | Lines |
---|---|---|
src/context.ts | 22.22% | 7 Missing :warning: |
src/jaro-winkler.ts | 96.29% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is awesome! Do you think you could add some tests for the new method, please?
Yes, done
This is obviously very cool, I am just not sure if there is enough demand to justify the complexity. But this is more of a strategic decision that I'll leave up to @roziscoding. From a technical point of view, this is pretty awesome!
I like this, and I think we should go ahead with it, especially since it's opt-in
Implement the functionality of acquiring the closest similar command in case of an misspelled command.
The
.getNearestCommand(commands, ...options)
function has been added to ctx, as it was suggested.options: { ignoreCase?: boolean; similarityThreshold?: number; }
Example of use: