Function boolToString

  • Converts a boolean to a string value.

    Parameters

    • Optional value: null | boolean

      The string to convert.

    Returns "true" | "false"

    The string "true" if the boolean strict equals true, otherwise the string "false".

    Example

    Basic usage

    boolToString(true) // "true"
    boolToString(false) // "false"
    boolToString(null) // "false"
    boolToString(undefined) // "false"

Generated using TypeDoc