mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 19:04:46 +00:00
refactor(pacakages/stdlib): add base jsdoc for each function
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/**
|
||||
* Calculate the Levenshtein distance between two strings
|
||||
* @name levenshteinDistance
|
||||
* @category Text
|
||||
* @description Calculate the Levenshtein distance between two strings
|
||||
*
|
||||
* @param {string} left First string
|
||||
* @param {string} right Second string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { templateObject } from './index';
|
||||
import { templateObject } from '.';
|
||||
|
||||
describe('templateObject', () => {
|
||||
// it('replace template placeholders with corresponding values from args', () => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user