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
trusty-festivity-extension-2.3.0 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.9.0.beta2 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.9.0.beta1 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.1 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/js-yaml/node_modules/argparse/examples/choice.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.1.rc1 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-wedge-0.9.0.dev stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.0 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.0.rc3 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.0.rc2 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.0.rc1 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.8.0.beta1 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
opal-0.7.2 stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/examples/choice.js
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
entangled-0.0.16 spec/dummy/public/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/examples/choice.js
entangled-0.0.15 spec/dummy/public/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js