aboutsummaryrefslogtreecommitdiff
path: root/src/modules/string
diff options
context:
space:
mode:
authorEric Cheng <[email protected]>2022-10-20 17:49:31 -0400
committerGitHub <[email protected]>2022-10-20 23:49:31 +0200
commit02f3967a9960a93a8f6137aebcaaae5754261135 (patch)
tree9cb24a159eee63dea69979ed6d1fec7785564dca /src/modules/string
parent79858fea203bce7ada9e9bcc7751f6ab25123977 (diff)
downloadfaker-02f3967a9960a93a8f6137aebcaaae5754261135.tar.xz
faker-02f3967a9960a93a8f6137aebcaaae5754261135.zip
docs(string): update function jsdocs (#1473)
Diffstat (limited to 'src/modules/string')
-rw-r--r--src/modules/string/index.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts
index a02fea0f..171c0cf6 100644
--- a/src/modules/string/index.ts
+++ b/src/modules/string/index.ts
@@ -98,14 +98,16 @@ export class StringModule {
/**
* Generating a string consisting of letters in the English alphabet.
*
- * @param options Either the number of characters or an options instance. Defaults to `{ length: 1, casing: 'lower', bannedChars: [] }`.
+ * @param options Either the number of characters or an options instance. Defaults to `{ length: 1, casing: 'mixed', bannedChars: [] }`.
* @param options.length The number of characters to generate. Defaults to `1`.
- * @param options.casing The casing of the characters. Defaults to `'lower'`.
+ * @param options.casing The casing of the characters. Defaults to `'mixed'`.
* @param options.bannedChars An array with characters to exclude. Defaults to `[]`.
*
* @example
* faker.string.alpha() // 'b'
- * faker.string.alpha(10) // 'qccrabobaf'
+ * faker.string.alpha(10) // 'fEcAaCVbaR'
+ * faker.string.alpha({ casing: 'lower' }) // 'r'
+ * faker.string.alpha({ bannedChars: ['W'] }) // 'Z'
* faker.string.alpha({ length: 5, casing: 'upper', bannedChars: ['A'] }) // 'DTCIC'
*
* @since 8.0.0
@@ -173,8 +175,10 @@ export class StringModule {
*
* @example
* faker.string.alphanumeric() // '2'
- * faker.string.alphanumeric(5) // '3e5v7'
- * faker.string.alphanumeric({ length: 5, bannedChars: ["a"] }) // 'xszlm'
+ * faker.string.alphanumeric(5) // '3e5V7'
+ * faker.string.alphanumeric({ casing: 'upper' }) // 'A'
+ * faker.string.alphanumeric({ bannedChars: ['W'] }) // 'r'
+ * faker.string.alphanumeric({ length: 5, bannedChars: ["a"] }) // 'x1Z7f'
*
* @since 8.0.0
*/