1
0
mirror of https://github.com/robonen/tools.git synced 2026-03-20 10:54:44 +00:00

refactor(pacakages/stdlib): add base jsdoc for each function

This commit is contained in:
2024-10-16 06:27:14 +07:00
parent eadf791942
commit 679bced9f1
28 changed files with 219 additions and 54 deletions

View File

@@ -1,7 +1,9 @@
export type Trigrams = Map<string, number>;
/**
* Extracts trigrams from a text and returns a map of trigram to count
* @name trigramProfile
* @category Text
* @description Extracts trigrams from a text and returns a map of trigram to count
*
* @param {string} text The text to extract trigrams
* @returns {Trigrams} A map of trigram to count
@@ -23,7 +25,9 @@ export function trigramProfile(text: string): Trigrams {
}
/**
* Calculates the trigram distance between two strings
* @name trigramDistance
* @category Text
* @description Calculates the trigram distance between two strings
*
* @param {Trigrams} left First text trigram profile
* @param {Trigrams} right Second text trigram profile