Function argv

  • Function to parse the command line arguments passed in and return the value of one argument

    Parameters

    • param: string

      the argument to look for in the command line

    Returns string | boolean

    the value found for the argument, or if the argument is present without an argument true, or false

    Example

    if the command line is --port 8080 -n -tf

    argv('--port') // => '8080'
    argv('-n') // => true
    argv('-g') // => false
    argv('-t') // => false
    argv('-f') // => false
    argv('-tf') // => true

Generated using TypeDoc