cli-argument-helper - v2.3.0
    Preparing search index...
    • Get an argument value from the argument list. For example:

      --user-id 123 --user-id=123

      This function will iterate over the entire argument list until it finds the argument. if you need to test a specific index of the argument list, use getArgumentAssignmentFromIndex.

      This function uses getArgumentAssignmentFromIndex under the hood.

      Type Parameters

      • T

      Parameters

      • args: string[]

        Argument list

      • argumentName: string

        Named argument

      • fn: CreateResultFn<T>

        Function to parse the argument value

      Returns null | T

      Argument value or null if not found