Non-stringifiable to Empty String: replaces expressions without toString property with empty strings.

const value = n2e`string: ${'foo'} number: ${42} boolean: ${true} null: ${null} undefined: ${undefined}`;
// value === 'string: foo number: 42 boolean: true null: undefined: '
  • Parameters

    • strings: TemplateStringsArray

      The string literals.

    • Rest...exp: unknown[]

      The expressions.

    Returns string

    The output string.