docs(text): add module doc (#4812)

This commit is contained in:
David Sherret 2024-05-22 14:13:19 -04:00 committed by GitHub
parent 0079ea05b6
commit 1e16dc9e76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,31 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
/**
* @module
* Utility functions for working with text.
*
* There are various functions for manipulating text, such as `toCamelCase`:
*
* ```ts
* import { toCamelCase } from "@std/text/case";
*
* console.log(toCamelCase("snake_case")); // "snakeCase"
* ```
*
* Or for comparing strings:
*
* ```ts
* import { compareSimilarity } from "@std/text/compare-similarity";
* const words = ["hi", "hello", "help"];
*
* // words most-similar to "hep" will be at the front
* words.sort(compareSimilarity("hep"));
* ```
*
* This module is browser compatible.
*/
export * from "./levenshtein_distance.ts";
export * from "./closest_string.ts";
export * from "./compare_similarity.ts";