Function booleanCLAType

  • Function to convert a string into a boolean for command line argument parsing. Returns null if the input is malformed. Note that the command-line-arguments module's built in boolean type is actually a flag that is either absent or true. https://github.com/75lb/command-line-args/wiki/Notation-rules We need this custom boolean parsing because our command line arguments are true, false, or absent.

    Parameters

    • bool: string

    Returns boolean | null