Function normalizeString

  • Takes a string or a template string and returns a plain string.

    Example

    normalizeString(`Hello ${13}!`); // "Hello 13!"
    normalizeString`Hello ${13}!`; // "Hello 13!"

    See

    Tagged templates

    Type Parameters

    • Input extends string | TemplateStringsArray

    Parameters

    • input: Input

      String or template string.

    • Rest ...expressions: ReadOnlyArray

      Possible values passed to the template string.

    Returns Input extends string
        ? Input
        : string

    Plain string.