Formats a given input string with alphanumeric placeholders.

// returns "Hello World"
formatString("{first} {second}", {first:"Hello", second:"World"});
  • Parameters

    • string: string

      The input string with placeholders.

    • parameters: Record<string, undefined | string>

      A hash of parameters to place in the placeholders.

    Returns string

    The formatted string.