Function chompIf

  • Chomp one character if it passes the test.

    Remarks

    Example

       const chompUpper: P.Parser<P.Unit> =
    P.chompIf(Helpers.isUpper)

    So this can chomp a character like T and produces a () value.

    Parameters

    • isGood: ((char: string) => boolean)
        • (char: string): boolean
        • Parameters

          • char: string

          Returns boolean

    Returns Simple.Parser<Symbol>