Skip to content

Commit

Permalink
docs(text): add module doc (#4812)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored May 22, 2024
1 parent 0079ea0 commit 1e16dc9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions text/mod.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 1e16dc9

Please sign in to comment.