peberminta - v0.10.0
    Preparing search index...

    Function tryParse

    • Utility function that provides a bit cleaner interface for running a parser. Returns undefined in case parser did not match.

      Note: this doesn't capture errors thrown during parsing. Nonmatch is considered a part or normal flow. Errors mean unrecoverable state and it's up to client code to decide where to throw errors and how to get back to safe state.

      Type Parameters

      • TToken
      • TOptions
      • TValue

      Parameters

      Returns undefined | TValue

      A matched value or undefined in case of nonmatch.