From 48c0c8f71905fba04587381f912d8bd047fc6cc6 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 28 Mar 2022 15:06:39 +0200 Subject: [PATCH 1/2] docs: mention template literals in fake docs --- src/fake.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fake.ts b/src/fake.ts index d8cc6ff7096..d7332e51f5f 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 list 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, From da5986623a25507aafc257b5214afa75dca5cb54 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 28 Mar 2022 16:46:57 +0200 Subject: [PATCH 2/2] chore: apply suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Leyla Jähnig <77127505+xDivisionByZerox@users.noreply.github.com> --- src/fake.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fake.ts b/src/fake.ts index d7332e51f5f..854b708a568 100644 --- a/src/fake.ts +++ b/src/fake.ts @@ -18,7 +18,7 @@ export class Fake { * Generator method for combining faker methods based on string input. * * 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 list or persistent storage (json etc.). + * 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}}!`,