aboutsummaryrefslogtreecommitdiff
path: root/src/modules/string/index.ts
diff options
context:
space:
mode:
authorDivisionByZero <[email protected]>2023-01-29 17:28:13 +0100
committerGitHub <[email protected]>2023-01-29 16:28:13 +0000
commit7bc4a099558318c690d0101dc4765c08dee2c840 (patch)
treef61296db6953c65c332210798ca34a755583a4fc /src/modules/string/index.ts
parentcec78775e995ece1e6004e8aece6304820126296 (diff)
downloadfaker-7bc4a099558318c690d0101dc4765c08dee2c840.tar.xz
faker-7bc4a099558318c690d0101dc4765c08dee2c840.zip
refactor(string): rename `special` to `symbol` (#1789)
Diffstat (limited to 'src/modules/string/index.ts')
-rw-r--r--src/modules/string/index.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts
index 6184c043..8f62788a 100644
--- a/src/modules/string/index.ts
+++ b/src/modules/string/index.ts
@@ -740,20 +740,23 @@ export class StringModule {
}
/**
- * Returns a string containing only special characters.
+ * Returns a string containing only special characters from the following list:
+ * ```txt
+ * ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
+ * ```
*
* @param length Length of the generated string. Defaults to `1`.
* @param length.min The minimum number of special characters to generate.
* @param length.max The maximum number of special characters to generate.
*
* @example
- * faker.string.special() // '$'
- * faker.string.special(5) // '#*!.~'
- * faker.string.special({ min: 5, max: 10 }) // ')|@*>^+'
+ * faker.string.symbol() // '$'
+ * faker.string.symbol(5) // '#*!.~'
+ * faker.string.symbol({ min: 5, max: 10 }) // ')|@*>^+'
*
* @since 8.0.0
*/
- special(
+ symbol(
length:
| number
| {