lib
name
isLastDoubleHyphen
withDefaults
lib: typeof arg = arg

The imported library itself

name: "tridactyl-arg"

The arguments parsing library name

  • Small function to test if the double hyphen is the last option. If a command does not expect empty arguments, and user just pass "--" as a normal argument, this function cal tell it.

    Parameters

    • argv: string[]

    Returns boolean

  • Add defaults for options that were not parsed.

    Type Parameters

    • T extends object
    • K extends string | number | symbol

    Parameters

    • options: T
    • defaults: Required<Pick<T, K>>

    Returns T & Required<Pick<T, K>>