2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2024-04-10 02:43:44 +00:00
|
|
|
// This module is browser compatible.
|
2023-11-05 12:49:00 +00:00
|
|
|
|
2024-05-22 18:13:19 +00:00
|
|
|
/**
|
|
|
|
* Utility functions for working with text.
|
|
|
|
*
|
|
|
|
* ```ts
|
2024-06-11 07:34:14 +00:00
|
|
|
* import { toCamelCase, compareSimilarity } from "@std/text";
|
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from `@std/assert` (#5199)
* refactor: import from `@std/assert`
* update
2024-06-30 08:30:10 +00:00
|
|
|
* import { assertEquals } from "@std/assert";
|
2024-05-22 18:13:19 +00:00
|
|
|
*
|
2024-06-03 04:10:27 +00:00
|
|
|
* assertEquals(toCamelCase("snake_case"), "snakeCase");
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
*
|
|
|
|
* const words = ["hi", "help", "hello"];
|
2024-05-22 18:13:19 +00:00
|
|
|
*
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
* // Words most similar to "hep" will be at the front
|
|
|
|
* assertEquals(words.sort(compareSimilarity("hep")), ["help", "hi", "hello"]);
|
2024-05-22 18:13:19 +00:00
|
|
|
* ```
|
|
|
|
*
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
* @module
|
2024-05-22 18:13:19 +00:00
|
|
|
*/
|
|
|
|
|
2024-01-09 01:55:39 +00:00
|
|
|
export * from "./levenshtein_distance.ts";
|
|
|
|
export * from "./closest_string.ts";
|
|
|
|
export * from "./compare_similarity.ts";
|
|
|
|
export * from "./word_similarity_sort.ts";
|
2024-07-16 03:39:39 +00:00
|
|
|
export * from "./to_camel_case.ts";
|
|
|
|
export * from "./to_kebab_case.ts";
|
|
|
|
export * from "./to_pascal_case.ts";
|
|
|
|
export * from "./to_snake_case.ts";
|