Sha256: 319e6c3f2582ef33f0853f76d3ebde5402c8296ca62a4b9e220f218872f927b1
Contents?: true
Size: 574 Bytes
Versions: 2
Compression:
Stored size: 574 Bytes
Contents
var optspec = [ ["-n", "--dry-run", "Don't change anything"], ["-d", "--debug", "Enable debugging output"], ["-c", "--config FILE", "Specify configuration file"] ]; var parser = new optparse.OptionParser(optspec); var options = { "dry-run": false, "debug": false, "config": null } parser.on("dry-run", function () { options["dry-run"] = true }) parser.on("debug", function() { options["debug"] = true }) parser.on("config", function(opt, file) { options["config"] = file }) parser.parse(document.argv) document.body = options
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
noms-command-2.1.1 | fixture/public/lib/showopt.js |
noms-command-0.5.0 | fixture/public/lib/showopt.js |