Works with
•JSR Score58%•It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun




Published2 years ago (0.215.0)
Functions
f
closestString(): string
givenWord: string,
possibleWords: string[],
options?: { caseSensitive?: boolean; }
get most-similar word
f
compareSimilarity(): () => number
givenWord: string,
options?: { caseSensitive?: boolean; }
a: string,
b: string
Sort based on word similarity
f
levenshteinDistance(): number
str1: string,
str2: string
Calculates the Levenshtein distance between two strings.
f
toCamelCase(input: string): string
Converts a string into camelCase.
f
toKebabCase(input: string): string
Converts a string into kebab-case.
f
toPascalCase(input: string): string
Converts a string into PascalCase.
f
toSnakeCase(input: string): string
Converts a string into snake_case.
f
wordSimilaritySort(): string[]
givenWord: string,
possibleWords: string[],
options?: { caseSensitive?: boolean; }
Sorts a string-array by similarity to a given string