lib/gcli/commands/help.js
function addParamGroups(command) {
  Object.defineProperty(command, 'paramGroups', {
    get: function() {
      var paramGroups = {};
      this.params.forEach(function(param) {
        var groupName = param.option || l10n.lookup('canonDefaultGroupName');
        if (paramGroups[groupName] == null) {
          paramGroups[groupName] = [];
        }
        paramGroups[groupName].push(param);
      });
      return paramGroups;
    },
    enumerable: true
  });
}
function addParamGroups(command) {
  Object.defineProperty(command, 'paramGroups', {
    get: function() {
      var paramGroups = {};
      this.params.forEach(function(param) {
        var groupName = param.option || l10n.lookup('canonDefaultGroupName');
        if (paramGroups[groupName] == null) {
          paramGroups[groupName] = [];
        }
        paramGroups[groupName].push(param);
      });
      return paramGroups;
    },
    enumerable: true
  });
}
function addParamGroups ( command ) { Object . defineProperty ( command , 'paramGroups' , { get : function ( ) { var paramGroups = { } ; this . params . forEach ( function ( param ) { var groupName = param . option || l10n . lookup ( 'canonDefaultGroupName' ) ; if ( paramGroups [ groupName ] == null ) { paramGroups [ groupName ] = [ ] ; } paramGroups [ groupName ] . push ( param ) ; } ) ; return paramGroups ; } , enumerable : true } ) ; }
Add an 'paramGroups' accessor to a command metadata object to sort the
params into groups according to the option of the param.
Add an paramGroups accessor to a command metadata object to sort the params into groups according to the option of the param .