mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
docs(text): add module doc (#4812)
This commit is contained in:
parent
0079ea05b6
commit
1e16dc9e76
25
text/mod.ts
25
text/mod.ts
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user