diff options
| author | ST-DDT <[email protected]> | 2022-03-28 18:30:28 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-28 18:30:28 +0200 |
| commit | 3e47440c21d05adadff860a6e1a72e947f73beae (patch) | |
| tree | 25c375667eca386b86d4a7ba72d7a6fa4da13b97 /src | |
| parent | 0884865531d7b5172ef87e1cac71ecf074daf68e (diff) | |
| download | faker-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.ts | 5 |
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, |
