BVB Source Codes

reactide Show constant.js Source code

Return Download reactide: download constant.js Source code - Download reactide Source code - Type:.js
  1. /*:nodoc:*
  2.  * class ActionStoreConstant
  3.  *
  4.  * This action stores the value specified by the const keyword argument.
  5.  * (Note that the const keyword argument defaults to the rather unhelpful null.)
  6.  * The 'store_const' action is most commonly used with optional
  7.  * arguments that specify some sort of flag.
  8.  *
  9.  * This class inherited from [[Action]]
  10.  **/
  11. 'use strict';
  12.  
  13. var util = require('util');
  14.  
  15. var Action = require('../../action');
  16.  
  17. /*:nodoc:*
  18.  * new ActionStoreConstant(options)
  19.  * - options (object): options hash see [[Action.new]]
  20.  *
  21.  **/
  22. var ActionStoreConstant = module.exports = function ActionStoreConstant(options) {
  23.   options = options || {};
  24.   options.nargs = 0;
  25.   if (typeof options.constant === 'undefined') {
  26.     throw new Error('constant option is required for storeAction');
  27.   }
  28.   Action.call(this, options);
  29. };
  30. util.inherits(ActionStoreConstant, Action);
  31.  
  32. /*:nodoc:*
  33.  * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void
  34.  * - parser (ArgumentParser): current parser
  35.  * - namespace (Namespace): namespace for output data
  36.  * - values (Array): parsed values
  37.  * - optionString (Array): input option string(not parsed)
  38.  *
  39.  * Call the action. Save result in namespace object
  40.  **/
  41. ActionStoreConstant.prototype.call = function (parser, namespace) {
  42.   namespace.set(this.dest, this.constant);
  43. };
  44.  
downloadconstant.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