Documentation for Simbo's Packages
    Preparing search index...
    • Parses an input that must be one of the given options.

      The comparison is case-sensitive. Surrounding whitespace is ignored.

      Type Parameters

      • T extends string

      Parameters

      • name: string

        The name of the input.

      • options: readonly T[]

        The allowed options.

      • defaultValue: T

        The option to return if the input is empty or not set.

      Returns T

      The parsed option.

      if the input is set to a value that is not one of the options.