European Parliament MCP Server API - v1.2.6
    Preparing search index...

    Function parseTimeoutValue

    • Parse and validate a timeout string value.

      Accepts only strings consisting entirely of digits (/^\d+$/), then verifies the resulting integer is positive and finite.

      Parameters

      • value: string | undefined

        Raw string value (e.g. from --timeout argument or env var)

      Returns number | undefined

      Parsed positive integer, or undefined if invalid

      parseTimeoutValue('90000'); // 90000
      parseTimeoutValue('10s'); // undefined (non-digit characters)
      parseTimeoutValue('0'); // undefined (not positive)
      parseTimeoutValue(''); // undefined