title: Missing arguments for a NodeJS app
body: <p>I'm writing a NodeJS app that accepts command-line arguments. To parse the options, I'm using a Node package called <a href="https://www.npmjs.org/package/commander" rel="nofollow">Commander</a>. There's one option (-f / --fileName) that I want to check. Here's what different inputs produce:</p>
  
  <p><code>nodeapp --fileName sampleFile</code> results in <code>program.fileName="sampleFile"</code></p>
  
  <p><code>nodeapp --fileName</code> results in <code>program.fileName=undefined</code></p>
  
  <p><code>nodeapp" results</code> results in <code>program.fileName=undefined</code></p>
  
  <p>I want <code>nodeapp --fileName</code> to throw a "Please specify a file name" error, but I want <code>nodeapp</code> to work fine. </p>
  
  <p>Is there any standard that specifies how to deal with missing parameters, or a best-practice that I should follow?</p>
  
  <p>In other words, if an option requires a parameter, and the parameter is not provided, should it be treated as an error case, or should the option be ignored?</p>