function findSubCommand(subCommandName, subCommands) {
  var command;
  (0, _array.arrayEach)(subCommands, function (cmd) {
    var cmds = cmd.key ? cmd.key.split(':') : null;

    if (Array.isArray(cmds) && cmds[1] === subCommandName) {
      command = cmd;
      return false;
    }
  });
  return command;
}
Execute command by its name.

@param {String} commandName Command id.
@param {*} params Arguments passed to command task.