function buildCommandMap()

in spec/command_tests/helpers.ts [18:30]


function buildCommandMap(commandList: CommandList) {
  if (commandMap == null) {
    commandMap = {};
  }
  for (let commandName in commandList) {
    let command = commandList[commandName];
    if (command instanceof Command) {
      commandMap[command.method + ':' + (command.path[0] == '/' ? '':'/') + command.path] = command;
    } else {
      buildCommandMap(command);
    }
  }
}