aboutsummaryrefslogtreecommitdiff
path: root/src/modules/string
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-03-29 20:36:46 +0700
committerGitHub <[email protected]>2023-03-29 13:36:46 +0000
commit3562e872530b3610d95be71aa6f4f7fdfef7134f (patch)
treec6ba28a9f3cf30e5bf5c0a935fead6bdb2668531 /src/modules/string
parent88e561a5490003a41665eb007c5c28ff0800ae09 (diff)
downloadfaker-3562e872530b3610d95be71aa6f4f7fdfef7134f.tar.xz
faker-3562e872530b3610d95be71aa6f4f7fdfef7134f.zip
docs: add overview guides to specific modules (#1929)
Diffstat (limited to 'src/modules/string')
-rw-r--r--src/modules/string/index.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts
index f6180df3..4c5a7dc3 100644
--- a/src/modules/string/index.ts
+++ b/src/modules/string/index.ts
@@ -87,6 +87,19 @@ const SAMPLE_MAX_LENGTH = 2 ** 20;
/**
* Module to generate string related entries.
+ *
+ * ### Overview
+ *
+ * For a string containing just A-Z characters, use [`alpha()`](https://next.fakerjs.dev/api/string.html#alpha). To add digits too, use [`alphanumeric()`](https://next.fakerjs.dev/api/string.html#alphanumeric). If you only want punctuation marks/symbols, use [`symbol()`](https://next.fakerjs.dev/api/string.html). For a full set of ASCII characters, use [`sample()`](https://next.fakerjs.dev/api/string.html#sample). For a custom set of characters, use [`fromCharacters()`](https://next.fakerjs.dev/api/string.html#fromcharacters).
+ *
+ * For strings of base-ten digits, use [`numeric()`](https://next.fakerjs.dev/api/string.html#numeric). For other bases, use [`binary()`](https://next.fakerjs.dev/api/string.html#binary), [`octal()`](https://next.fakerjs.dev/api/string.html#octal), or [`hexadecimal()`](https://next.fakerjs.dev/api/string.html#hexadecimal)).
+ *
+ * You can generate standard ID strings using [`uuid()`](https://next.fakerjs.dev/api/string.html#uuid) or [`nanoid()`](https://next.fakerjs.dev/api/string.html#nanoid).
+ *
+ * ### Related modules
+ *
+ * - Emoji can be found at [`faker.internet.emoji()`](https://next.fakerjs.dev/api/internet.html#emoji).
+ * - The [`faker.helpers`](https://next.fakerjs.dev/api/helpers.html) module includes a number of string related methods.
*/
export class StringModule {
constructor(private readonly faker: Faker) {