Sha256: 3f9c9c87f0d880101e7957436eb876a2b9352f40d0f9b19b34bf597ba90b6128

Contents?: true

Size: 1.01 KB

Versions: 244

Compression:

Stored size: 1.01 KB

Contents

/*:nodoc:*
 * class ActionCount
 *
 * This counts the number of times a keyword argument occurs.
 * For example, this is useful for increasing verbosity levels
 *
 * This class inherided from [[Action]]
 *
 **/
'use strict';

var util = require('util');

var Action = require('../action');

/*:nodoc:*
 * new ActionCount(options)
 * - options (object): options hash see [[Action.new]]
 *
 **/
var ActionCount = module.exports = function ActionCount(options) {
  options = options || {};
  options.nargs = 0;

  Action.call(this, options);
};
util.inherits(ActionCount, Action);

/*:nodoc:*
 * ActionCount#call(parser, namespace, values, optionString) -> Void
 * - parser (ArgumentParser): current parser
 * - namespace (Namespace): namespace for output data
 * - values (Array): parsed values
 * - optionString (Array): input option string(not parsed)
 *
 * Call the action. Save result in namespace object
 **/
ActionCount.prototype.call = function (parser, namespace) {
  namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
};

Version data entries

244 entries across 229 versions & 26 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/argparse/lib/action/count.js
disco_app-0.18.0 test/dummy/node_modules/argparse/lib/action/count.js
disco_app-0.18.2 test/dummy/node_modules/argparse/lib/action/count.js
appmap-0.72.2 ./node_modules/argparse/lib/action/count.js
appmap-0.72.1 ./node_modules/argparse/lib/action/count.js
appmap-0.72.0 ./node_modules/argparse/lib/action/count.js
appmap-0.71.0 ./node_modules/argparse/lib/action/count.js
disco_app-0.16.1 test/dummy/node_modules/argparse/lib/action/count.js
appmap-0.70.2 ./node_modules/argparse/lib/action/count.js
appmap-0.70.1 ./node_modules/argparse/lib/action/count.js
appmap-0.70.0 ./node_modules/argparse/lib/action/count.js
appmap-0.69.0 ./node_modules/argparse/lib/action/count.js
appmap-0.68.2 ./node_modules/argparse/lib/action/count.js
appmap-0.68.1 ./node_modules/argparse/lib/action/count.js
disco_app-0.15.2 test/dummy/node_modules/argparse/lib/action/count.js
appmap-0.68.0 ./node_modules/argparse/lib/action/count.js
appmap-0.67.1 ./node_modules/argparse/lib/action/count.js
appmap-0.67.0 ./node_modules/argparse/lib/action/count.js
disco_app-0.18.4 test/dummy/node_modules/argparse/lib/action/count.js
disco_app-0.18.1 test/dummy/node_modules/argparse/lib/action/count.js