Blame view

node_modules/argparse/lib/action/store/true.js 693 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  /*:nodoc:*
   * class ActionStoreTrue
   *
   * This action store the values True respectively.
   * This isspecial cases of 'storeConst'
   *
   * This class inherited from [[Action]]
   **/
  'use strict';
  
  var util = require('util');
  
  var ActionStoreConstant = require('./constant');
  
  /*:nodoc:*
   * new ActionStoreTrue(options)
   * - options (object): options hash see [[Action.new]]
   *
   **/
  var ActionStoreTrue = module.exports = function ActionStoreTrue(options) {
    options = options || {};
    options.constant = true;
    options.defaultValue = options.defaultValue !== null ? options.defaultValue : false;
    ActionStoreConstant.call(this, options);
  };
  util.inherits(ActionStoreTrue, ActionStoreConstant);