Skip to content

Commit 3e47440

Browse files
docs: mention template literals in fake docs (#701)
Co-authored-by: Leyla Jähnig <[email protected]>
1 parent 0884865 commit 3e47440

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fake.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export class Fake {
1717
/**
1818
* Generator method for combining faker methods based on string input.
1919
*
20-
* This will check the given string for placeholders and replace them by calling the specified faker method.
20+
* Note: If you just want to create a string on the fly, we recommend using string template literals instead.
21+
* This method is useful if you wish to choose a random format from a non-executable source or persistent storage (json etc.).
22+
*
23+
* It checks the given string for placeholders and replace them by calling the specified faker method.
2124
* E.g. the input `Hi, my name is {{name.firstName}}!`,
2225
* will use the `faker.name.firstName()` method to resolve the placeholder.
2326
* It is also possible to combine static text with placeholders,

0 commit comments

Comments
 (0)