diff options
| author | DivisionByZero <[email protected]> | 2023-01-29 17:28:13 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-29 16:28:13 +0000 |
| commit | 7bc4a099558318c690d0101dc4765c08dee2c840 (patch) | |
| tree | f61296db6953c65c332210798ca34a755583a4fc /src | |
| parent | cec78775e995ece1e6004e8aece6304820126296 (diff) | |
| download | faker-7bc4a099558318c690d0101dc4765c08dee2c840.tar.xz faker-7bc4a099558318c690d0101dc4765c08dee2c840.zip | |
refactor(string): rename `special` to `symbol` (#1789)
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/string/index.ts | 13 |
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 | { |
