Skip to content

Commit 9729c29

Browse files
committed
docs(string): update function jsdocs
1 parent 79858fe commit 9729c29

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/modules/string/index.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ export class StringModule {
9898
/**
9999
* Generating a string consisting of letters in the English alphabet.
100100
*
101-
* @param options Either the number of characters or an options instance. Defaults to `{ length: 1, casing: 'lower', bannedChars: [] }`.
101+
* @param options Either the number of characters or an options instance. Defaults to `{ length: 1, casing: 'mixed', bannedChars: [] }`.
102102
* @param options.length The number of characters to generate. Defaults to `1`.
103-
* @param options.casing The casing of the characters. Defaults to `'lower'`.
103+
* @param options.casing The casing of the characters. Defaults to `'mixed'`.
104104
* @param options.bannedChars An array with characters to exclude. Defaults to `[]`.
105105
*
106106
* @example
107107
* faker.string.alpha() // 'b'
108-
* faker.string.alpha(10) // 'qccrabobaf'
108+
* faker.string.alpha(10) // 'fEcAaCVbaR'
109+
* faker.string.alpha({ casing: 'lower' }) // 'r'
110+
* faker.string.alpha({ bannedChars: ['W'] }) // 'Z'
109111
* faker.string.alpha({ length: 5, casing: 'upper', bannedChars: ['A'] }) // 'DTCIC'
110112
*
111113
* @since 8.0.0
@@ -173,8 +175,10 @@ export class StringModule {
173175
*
174176
* @example
175177
* faker.string.alphanumeric() // '2'
176-
* faker.string.alphanumeric(5) // '3e5v7'
177-
* faker.string.alphanumeric({ length: 5, bannedChars: ["a"] }) // 'xszlm'
178+
* faker.string.alphanumeric(5) // '3e5V7'
179+
* faker.string.alphanumeric({ casing: 'upper' }) // 'A'
180+
* faker.string.alphanumeric({ bannedChars: ['W'] }) // 'r'
181+
* faker.string.alphanumeric({ length: 5, bannedChars: ["a"] }) // 'x1Z7f'
178182
*
179183
* @since 8.0.0
180184
*/

0 commit comments

Comments
 (0)