aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-03-28 18:30:28 +0200
committerGitHub <[email protected]>2022-03-28 18:30:28 +0200
commit3e47440c21d05adadff860a6e1a72e947f73beae (patch)
tree25c375667eca386b86d4a7ba72d7a6fa4da13b97 /src
parent0884865531d7b5172ef87e1cac71ecf074daf68e (diff)
downloadfaker-3e47440c21d05adadff860a6e1a72e947f73beae.tar.xz
faker-3e47440c21d05adadff860a6e1a72e947f73beae.zip
docs: mention template literals in fake docs (#701)
Co-authored-by: Leyla Jähnig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/fake.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fake.ts b/src/fake.ts
index d8cc6ff7..854b708a 100644
--- a/src/fake.ts
+++ b/src/fake.ts
@@ -17,7 +17,10 @@ export class Fake {
/**
* Generator method for combining faker methods based on string input.
*
- * This will check the given string for placeholders and replace them by calling the specified faker method.
+ * Note: If you just want to create a string on the fly, we recommend using string template literals instead.
+ * This method is useful if you wish to choose a random format from a non-executable source or persistent storage (json etc.).
+ *
+ * It checks the given string for placeholders and replace them by calling the specified faker method.
* E.g. the input `Hi, my name is {{name.firstName}}!`,
* will use the `faker.name.firstName()` method to resolve the placeholder.
* It is also possible to combine static text with placeholders,