Sha256: b8cbbe547277e4fc37d0dae83f68c795905ab29befabdda157d5bce4ed234f39

Contents?: true

Size: 449 Bytes

Versions: 139

Compression:

Stored size: 449 Bytes

Contents

#!/usr/bin/env node
'use strict';

var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
  version: '0.0.1',
  addHelp: true,
  description: 'Argparse examples: choice'
});

parser.addArgument(['foo'], {choices: 'abc'});

parser.printHelp();
console.log('-----------');

var args;
args = parser.parseArgs(['c']);
console.dir(args);
console.log('-----------');
parser.parseArgs(['X']);
console.dir(args);

Version data entries

139 entries across 125 versions & 8 rubygems

Version Path
ela-1.1.0 node_modules/argparse/examples/choice.js
opal-0.10.5 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.10.4 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.10.3 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.13 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.12 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.11 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.10.2 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.10 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
trusty-festivity-extension-2.5.9 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js