function mergeAtLevel(summary, level, newValue) {
    var levelParts = level.split('.');
    var partIndex = Number(levelParts[0]) -1;

    var parts = summary.getParts();
    var part = parts.get(partIndex);
    if (!part) {
        return summary;
    }

    var isEditingPart = levelParts.length < 2;
    if (isEditingPart) {
        part = part.merge(newValue);
    } else {
        part = editArticleInPart(part, level, newValue);
    }

    parts = parts.set(partIndex, part);
    return summary.set('parts', parts);
}
function mergeAtLevel(summary, level, newValue) {
    var levelParts = level.split('.');
    var partIndex = Number(levelParts[0]) -1;

    var parts = summary.getParts();
    var part = parts.get(partIndex);
    if (!part) {
        return summary;
    }

    var isEditingPart = levelParts.length < 2;
    if (isEditingPart) {
        part = part.merge(newValue);
    } else {
        part = editArticleInPart(part, level, newValue);
    }

    parts = parts.set(partIndex, part);
    return summary.set('parts', parts);
}
function mergeAtLevel ( summary , level , newValue ) { var levelParts = level . split ( '.' ) ; var partIndex = Number ( levelParts [ 0 ] ) - 1 ; var parts = summary . getParts ( ) ; var part = parts . get ( partIndex ) ; if ( ! part ) { return summary ; } var isEditingPart = levelParts . length < 2 ; if ( isEditingPart ) { part = part . merge ( newValue ) ; } else { part = editArticleInPart ( part , level , newValue ) ; } parts = parts . set ( partIndex , part ) ; return summary . set ( 'parts' , parts ) ; }
Edit an article, or a part, in a summary. Does a shallow merge.

@param {Summary} summary
@param {String} level
@param {Article|Part} newValue
@return {Summary}
Edit an article or a part in a summary . Does a shallow merge .
Merge an article at a specific level