refactor(packages/stdlib): levensthein fn replate to module export

This commit is contained in:
2024-04-11 00:22:20 +07:00
parent 002215303a
commit 92721b348a
3 changed files with 3 additions and 2 deletions
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
import levenshteinDistance from '.';
import {levenshteinDistance} from '.';
describe('levenshteinDistance', () => {
it('should calculate edit distance between two strings', () => {
@@ -5,7 +5,7 @@
* @param {string} b Second string
* @returns {number} The Levenshtein distance between the two strings
*/
export default function levenshteinDistance(a: string, b: string): number {
export function levenshteinDistance(a: string, b: string): number {
// If the strings are equal, the distance is 0
if (a === b) return 0;