Skip to content

Instantly share code, notes, and snippets.

@mcavage
Created September 8, 2011 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcavage/90dcabba552487bbcf7b to your computer and use it in GitHub Desktop.
Save mcavage/90dcabba552487bbcf7b to your computer and use it in GitHub Desktop.
var nopt = require('nopt');
var Options = {
"foo": String
};
var ShortOptions = {
"f": ["--foo"]
};
var parsed = nopt(Options, ShortOptions, process.argv, 2);
console.log(parsed.foo || '');
@mcavage
Copy link
Author

mcavage commented Sep 8, 2011

bluesnoop:tmp mark$ node nopt_bad_string.js -f 1644e47
1.644e+50
bluesnoop:tmp mark$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment