BVB Source Codes

reactide Show count.js Source code

Return Download reactide: download count.js Source code - Download reactide Source code - Type:.js
  1. /*:nodoc:*
  2.  * class ActionCount
  3.  *
  4.  * This counts the number of times a keyword argument occurs.
  5.  * For example, this is useful for increasing verbosity levels
  6.  *
  7.  * This class inherided from [[Action]]
  8.  *
  9.  **/
  10. 'use strict';
  11.  
  12. var util = require('util');
  13.  
  14. var Action = require('../action');
  15.  
  16. /*:nodoc:*
  17.  * new ActionCount(options)
  18.  * - options (object): options hash see [[Action.new]]
  19.  *
  20.  **/
  21. var ActionCount = module.exports = function ActionCount(options) {
  22.   options = options || {};
  23.   options.nargs = 0;
  24.  
  25.   Action.call(this, options);
  26. };
  27. util.inherits(ActionCount, Action);
  28.  
  29. /*:nodoc:*
  30.  * ActionCount#call(parser, namespace, values, optionString) -> Void
  31.  * - parser (ArgumentParser): current parser
  32.  * - namespace (Namespace): namespace for output data
  33.  * - values (Array): parsed values
  34.  * - optionString (Array): input option string(not parsed)
  35.  *
  36.  * Call the action. Save result in namespace object
  37.  **/
  38. ActionCount.prototype.call = function (parser, namespace) {
  39.   namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
  40. };
  41.  
downloadcount.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top