Function anyStringOf

  • Returns a parser that will parse any of the strings in strs and yield the text that was parsed. If it can't, it will fail softly without consuming input.

    Type Parameters

    • T extends string

    Parameters

    • Rest ...strs: T[]

      A set of string options to parse. In typescript, you can also use a constant tuple if you pass it in using the spread operator (...).

    Returns Parjser<T>