lib/gcli/commands/commands.js
function Commands(types, location) {
  this.types = types;
  this.location = location;

  // A lookup hash of our registered commands
  this._commands = {};
  // A sorted list of command names, we regularly want them in order, so pre-sort
  this._commandNames = [];
  // A lookup of the original commandSpecs by command name
  this._commandSpecs = {};

  // Enable people to be notified of changes to the list of commands
  this.onCommandsChange = util.createEvent('commands.onCommandsChange');
}
function Commands(types, location) {
  this.types = types;
  this.location = location;

  // A lookup hash of our registered commands
  this._commands = {};
  // A sorted list of command names, we regularly want them in order, so pre-sort
  this._commandNames = [];
  // A lookup of the original commandSpecs by command name
  this._commandSpecs = {};

  // Enable people to be notified of changes to the list of commands
  this.onCommandsChange = util.createEvent('commands.onCommandsChange');
}
function Commands ( types , location ) { this . types = types ; this . location = location ; // A lookup hash of our registered commands this . _commands = { } ; // A sorted list of command names, we regularly want them in order, so pre-sort this . _commandNames = [ ] ; // A lookup of the original commandSpecs by command name this . _commandSpecs = { } ; // Enable people to be notified of changes to the list of commands this . onCommandsChange = util . createEvent ( 'commands.onCommandsChange' ) ; }
A store for a list of commands
@param types Each command uses a set of Types to parse its parameters so the
Commands container needs access to the list of available types.
@param location String that, if set will force all commands to have a
matching runAt property to be accepted
A store for a list of commands