caps = function caps(_caps) {
    if (!_caps) {
        return '';
    }

    var result = void 0;

    /**
     * mobile caps
     */
    if (_caps.deviceName) {
        result = [sanitizeString(_caps.deviceName), sanitizeString(_caps.platformName), sanitizeString(_caps.platformVersion), sanitizeString(_caps.app)];
    } else {
        result = [sanitizeString(_caps.browserName), sanitizeString(_caps.version), sanitizeString(_caps.platform), sanitizeString(_caps.app)];
    }

    result = result.filter(function (n) {
        return n !== undefined && n !== '';
    });
    return result.join('.');
}
formats capability object into sanitized string for e.g.filenames
@param {Object} caps  Selenium capabilities