aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorCaleb Burton <[email protected]>2022-01-25 12:16:45 -0500
committerGitHub <[email protected]>2022-01-25 18:16:45 +0100
commitbbc67aa2cb60b5fe03d9a77a111045822e461f02 (patch)
tree89c044c9af43a27b354d450a4b41baebeeb8f361 /README.md
parent4406816a12714988b9ecac5832108ee2dfc10d23 (diff)
downloadfaker-bbc67aa2cb60b5fe03d9a77a111045822e461f02.tar.xz
faker-bbc67aa2cb60b5fe03d9a77a111045822e461f02.zip
docs: readme cleanup (#251)
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 18 insertions, 4 deletions
diff --git a/README.md b/README.md
index c9c77706..06dd665b 100644
--- a/README.md
+++ b/README.md
@@ -83,13 +83,14 @@ An in-depth overview of the API methods is available in the documentation. The A
| Finance | `faker.finance.amount()` | ¥23400 (After setting locale) |
| Git | `faker.git.commitMessage()` | feat: add products list page |
| Hacker | `faker.hacker.phrase()` | Try to reboot the SQL bus, maybe it will bypass the virtual application! |
-| Helpers | `faker.helpers.userCard()` | `{ avatar: ‘...’, email: ‘{ first }{ last }{ number }@{domain}’, first: '...' }`<br/><br/>All of the values are self-consistent (e.g. same first + last name in the email, too) |
-| Image | `faker.image.avatar()` | `https://s3.amazonaws.com/uifaces/faces/twitter/martip07/128.jpg` <img src=“https://s3.amazonaws.com/uifaces/faces/twitter/martip07/128.jpg” width=“64”/> |
+| Helpers | `faker.helpers.userCard()` | `{ avatar: '...', email: '{ first }{ last }{ number }@{domain}', first: '...' }`<br/><br/>All of the values are self-consistent (e.g. same first + last name in the email, too) |
+| Image | `faker.image.avatar()` | `https://s3.amazonaws.com/uifaces/faces/twitter/martip07/128.jpg` <img src="https://s3.amazonaws.com/uifaces/faces/twitter/martip07/128.jpg" width="64"/> |
| Internet | `faker.internet.color()` | #630c7b |
| Lorem | `faker.lorem.paragraph()` | Word, words, sentences, slug (lorem-ipsum), paragraph(s), text, lines |
| Music | `faker.music.genre()` | R&B |
| Name | `faker.name.firstName()` | Cameron |
| Phone | `faker.phone.phoneNumber()` | +1 291-299-0192 |
+| Random | `faker.random.locale()` | fr_CA |
| System | `faker.system.directoryPath()` | C:\Documents\Newsletters\ |
| Vehicle | `faker.vehicle.vehicle()` | 2011 Dodge Caravan |
@@ -260,9 +261,9 @@ Faker provides many useful utility functions.
| slugify | Removes unwanted characters from URI string |
| replaceSymbolWithNumber | Parses string for a symbol and replace it with a random number from 1-10 |
| replaceSymbols | Parses string for symbols (numbers or letters) and replaces them appropriately (# will be replaced with number, ? with letter and \* will be replaced with number or letter) |
- | replaceCreditCardSymbols | Replace symbols in a credit card schems including Luhn checksum |
+ | replaceCreditCardSymbols | Replace symbols in a credit card schema including Luhn checksum |
| repeatString | String repeat helper, alternative to String.prototype.repeat |
- | shuffle | Takes an array and randomizes it in place then returns it uses the modern version of the Fisher–Yates algorithm |
+ | shuffle | Takes an array and randomizes it in place then returns it using the modern version of the Fisher-Yates algorithm |
| mustache | Generates a string with mustache {{ }} |
| createCard | Generates a human card |
| contextualCard | Generates a human contextual card |
@@ -369,6 +370,19 @@ Faker provides many useful utility functions.
| phoneNumberFormat | Generates a random phone number with requested format (Array index) |
| phoneFormats | Generates a random phone number format |
+- faker.random
+
+ | API | Description |
+ | ------------- | --------------------------------------------------------------------------------- |
+ | arrayElement | Takes an array and returns a random element of the array |
+ | arrayElements | Takes an array and returns a subset with random elements of the array |
+ | objectElement | Takes an object and returns a random key or value |
+ | word | Generates a random word |
+ | words | Generate `N` random words, with `N` defaulting to a random number between 1 and 3 |
+ | locale | Generates a random locale |
+ | alpha | Generates lower/upper alphabetic characters |
+ | alphaNumeric | Generates alphanumeric characters |
+
- faker.system
| API | Description |